請見:hub.docker.com/r/sameersbn…mysql
緣由是能夠本身配置外部的mysql、主題等。nginx
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.git
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
複製代碼
還有一些免費插件,百度雲分享:github
連接: pan.baidu.com/s/11JFDoTvL… 提取碼: d7v4ajax
docker exec -it redmine redmine-install-plugins
複製代碼
可用主題: Redmine Themes Directorysql
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分鐘也何嘗不可:docker
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
哈):shell
用戶名: admin 密碼: admin數據庫
效果示例:bash
寫文不易,感謝讚揚!
dfface 的版權聲明:全部文章除特別聲明外,均採用 CC BY-NC-SA 4.0 許可協議。轉載請註明出處,嚴禁商業用途!