使用 docker 部署 Redmine 项目管理系统
2020/3/20 17:01:39
本文主要是介绍使用 docker 部署 Redmine 项目管理系统,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
说明文档
请见:hub.docker.com/r/sameersbn…
拉取非官方镜像
原因是可以自己配置外部的mysql、主题等。
docker pull sameersbn/redmine:4.0.4 复制代码
数据存储
mkdir -p ~/redmine 复制代码
进入mysql进行配置
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 许可协议。转载请注明出处,严禁商业用途!
这篇关于使用 docker 部署 Redmine 项目管理系统的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-19Docker-Compose容器集群化项目实战:新手入门指南
- 2024-11-19Docker镜像仓库项目实战:新手入门教程
- 2024-11-19Docker容器化部署项目实战:新手入门教程
- 2024-11-19Docker-Compose容器集群化资料入门教程
- 2024-11-19Docker镜像仓库资料详解:新手入门教程
- 2024-11-19Docker容器化部署资料:新手入门指南
- 2024-11-19Docker-Compose容器集群化教程:从入门到实践
- 2024-11-19Docker镜像仓库教程:新手入门指南
- 2024-11-19Docker容器化部署教程:初学者指南
- 2024-11-18Docker-Compose容器集群化入门教程