大家好,我是考100分的小小码 ,祝大家学习进步,加薪顺利呀。今天说一说redash docker部署_docker install,希望您对编程的造诣更进一步.
说明文档
请见: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 许可协议。转载请注明出处,严禁商业用途!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/13886.html