请见:hub.docker.com/r/sameersbn…
原因是可以自己配置外部的mysql、主题等。
docker pull sameersbn/redmine:4.0.4 复制代码
mkdir -p ~/redmine 复制代码
mysql -uroot -p CREATE USER 'redmine'@'%.%.%.%' IDENTIFIED BY 'password'; CREATE DATABASE IF NOT EXISTS `redmine_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`; GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `redmine_production`.* TO 'redmine'@'%.%.%.%'; 复制代码
可用插件: Redmine Plugins Directory.
mkdir -p ~/redmine/plugins cd ~/redmine/plugins # 简单复制即可,例如: git clone https://github.com/Ilogeek/redmine_issue_dynamic_edit.git git clone https://github.com/paginagmbh/redmine_lightbox2.git # git clone https://github.com/mikitex70/redmine_drawio.git git clone https://github.com/haru/redmine_theme_changer 复制代码
还有一些免费插件,百度云分享:
链接: pan.baidu.com/s/11JFDoTvL… 提取码: d7v4
docker exec -it redmine redmine-install-plugins 复制代码
可用主题: Redmine Themes Directory
mkdir -p ~/redmine/themes cd ~/redmine/themes git clone https://github.com/makotokw/redmine-theme-gitmike.git gitmike git clone https://github.com/mrliptontea/PurpleMine2.git git clone https://github.com/yenihayat/redmine-theme-yh.git 复制代码
docker exec -it redmine redmine-install-themes 复制代码
docker run --name=redmine -d \ --restart=always \ --env='DB_ADAPTER=mysql2' \ --env='DB_HOST=172.18.0.1' --env='DB_NAME=redmine_production' \ --env='DB_USER=redmine' --env='DB_PASS=password' \ --env='SMTP_USER=support@dfface.com' --env='SMTP_PASS=*****' \ --volume=/root/redmine:/home/redmine/data \ --publish=8085:80 \ --env='REDMINE_PORT=8085' \ sameersbn/redmine:4.0.4 复制代码
80
端口,且需要使用环境变量REDMINE_PORT
设置外部端口。DB_HOST
利用命令查看ip addr show docker0
,当然也可以使用容器数据库,具体看他的说明。如果是-it
,我们可以看到它会进行这些操作,所以等上10分钟也未尝不可:
Initializing logdir... Initializing datadir... Symlinking dotfiles... Installing configuration templates... Configuring redmine... Configuring redmine::database Configuring redmine::unicorn... Configuring redmine::secret_token... Generating a session token... Note: All old sessions will become invalid. Please specify the REDMINE_SECRET_TOKEN parameter for persistence. **SHOULD** be defined if you have a load-balancing Redmine cluster. Configuring redmine::max_concurrent_ajax_uploads... Configuring redmine::sudo_mode... Configuring redmine::autologin_cookie... Configuring redmine::email_delivery... Configuring redmine::backups... Configuring nginx... Configuring nginx::redmine... Installing plugins... Installing gems required by plugins... Migrating plugins. Please be patient, this could take a while... Installing themes... 2019-10-06 14:04:40,389 CRIT Supervisor running as root (no user in config file) 2019-10-06 14:04:40,390 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing 2019-10-06 14:04:40,391 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing 2019-10-06 14:04:40,391 WARN Included extra file "/etc/supervisor/conf.d/unicorn.conf" during parsing 2019-10-06 14:04:40,402 INFO RPC interface 'supervisor' initialized 2019-10-06 14:04:40,402 CRIT Server 'unix_http_server' running without any HTTP authentication checking 2019-10-06 14:04:40,403 INFO supervisord started with pid 1 2019-10-06 14:04:41,405 INFO spawned: 'unicorn' with pid 252 2019-10-06 14:04:41,406 INFO spawned: 'cron' with pid 253 2019-10-06 14:04:41,414 INFO spawned: 'nginx' with pid 254 2019-10-06 14:04:42,838 INFO success: unicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2019-10-06 14:04:42,839 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2019-10-06 14:04:42,840 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 复制代码
请等待一两分钟后再访问网页 http://localhost:8085(我已经部署到云上了所以对应网址会有变化,但你看端口还是8085
哈):
用户名: admin 密码: admin
效果示例:
写文不易,感谢赞赏!
dfface 的版权声明:所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处,严禁商业用途!