使用Docker搭建项目管理系统-Redmine

使用Docker搭建项目管理系统-Redmine

  • redmine简介
  • 特点
  • 环境准备
  • 数据库进行初始化
  • 启动redmine应用
  • 开放10083端口

参考地址介绍的比较详细(含括下面所有方式):https://github.com/sameersbn/docker-redmine
本文没有采用postgresql数据库方式,原因是对postgresql并不熟悉,另外本机本地已经安装有mysql5.7,所以参考上述连接中的外部mysql方式部署
如果对数据库没要求,可参考如下两个博客很快就能搭建完成
博客1
博客2(docker-compose快速安装redmine)
docekr-compose的安装使用可以参考此地址https://gitee.com/zhengqingya/docker-compose

redmine简介

Redmine是用Ruby开发的基于web的项目管理软件,是用ROR框架开发的一套跨平台项目管理系统,据说是源于Basecamp的ror版而来,支持多种数据库,有不少自己独特的功能,例如提供wiki、新闻台等,还可以集成其他版本管理系统和BUG跟踪系统,例如Perforce、SVN、CVS、TD等等。这种 Web 形式的项目管理系统通过“项目(Project)”的形式把成员、任务(问题)、文档、讨论以及各种形式的资源组织在一起,大家参与更新任务、文档等内容来推动项目的进度,同时系统利用时间线索和各种动态的报表形式来自动给成员汇报项目进度。

特点

支持多项目
灵活的基于角色的访问控制
问题跟踪系统
甘特图和日历
新闻、文档和文件管理
feeds 和邮件通知
项目wiki
项目论坛

环境准备

1、准备一台centos7机器,我的已经安装了mysql5.7,可参考我之前的安装博客
2、安装docker软件,可以参考我之前的安装博客
3、下载redmine镜像docker pull sameersbn/redmine:4.1.1-4

数据库进行初始化

mysql -uroot -p123456
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应用

docker run --name=redmine -it \
  --restart always\
  --publish=10083:80 \
  --env='DB_ADAPTER=mysql2' \
  --env='DB_HOST=192.168.0.166' --env='DB_NAME=redmine_production' \
  --env='DB_USER=redmine' --env='DB_PASS=password' \
  --volume=/srv/docker/redmine/redmine:/home/redmine/data \
  --volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
  sameersbn/redmine:4.1.1-4
  
 #docker run --help可查看相关参数

启动日志如下

[root@hecs-x-medium-2-linux-20200611091300 ~]# docker run --name=redmine -it --rm  --restart always\
>   --env='DB_ADAPTER=mysql2' \
>   --env='DB_HOST=192.168.0.166' --env='DB_NAME=redmine_production' \
>   --env='DB_USER=redmine' --env='DB_PASS=password' \
>   --volume=/srv/docker/redmine/redmine:/home/redmine/data \
>   --volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
>   sameersbn/redmine:4.1.1-4^C
[root@hecs-x-medium-2-linux-20200611091300 ~]# docker run --name=redmine -it --rm \
>   --restart always\
>   --publish=10083:80 \
>   --env='DB_ADAPTER=mysql2' \
>   --env='DB_HOST=192.168.0.166' --env='DB_NAME=redmine_production' \
>   --env='DB_USER=redmine' --env='DB_PASS=password' \
>   --volume=/srv/docker/redmine/redmine:/home/redmine/data \
>   --volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
>   sameersbn/redmine:4.1.1-4
docker: Conflicting options: --restart and --rm.
See 'docker run --help'.
[root@hecs-x-medium-2-linux-20200611091300 ~]# docker run --name=redmine -it \
>   --restart always\
>   --publish=10083:80 \
>   --env='DB_ADAPTER=mysql2' \
>   --env='DB_HOST=192.168.0.166' --env='DB_NAME=redmine_production' \
>   --env='DB_USER=redmine' --env='DB_PASS=password' \
>   --volume=/srv/docker/redmine/redmine:/home/redmine/data \
>   --volume=/srv/docker/redmine/redmine-logs:/var/log/redmine/ \
>   sameersbn/redmine:4.1.1-4
Initializing logdir...
Initializing datadir...
Generating OpenSSH client keys...
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::backups...
Configuring nginx...
Configuring nginx::redmine...
New redmine version. Clearing cache
Migrating database. Please be patient, this could take a while...
Database 'redmine_production' already exists
Installing plugins...
Installing gems required by plugins...
Your application has set without to "development:test". This will override the global value you are currently setting
Migrating plugins. Please be patient, this could take a while...
Installing themes...
2020-07-22 03:58:33,879 CRIT Supervisor running as root (no user in config file)
2020-07-22 03:58:33,879 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing
2020-07-22 03:58:33,879 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing
2020-07-22 03:58:33,879 WARN Included extra file "/etc/supervisor/conf.d/unicorn.conf" during parsing
2020-07-22 03:58:33,892 INFO RPC interface 'supervisor' initialized
2020-07-22 03:58:33,892 INFO supervisord started with pid 1
2020-07-22 03:58:34,894 INFO spawned: 'unicorn' with pid 300
2020-07-22 03:58:34,895 INFO spawned: 'cron' with pid 301
2020-07-22 03:58:34,896 INFO spawned: 'nginx' with pid 302
2020-07-22 03:58:36,322 INFO success: unicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-22 03:58:36,322 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-22 03:58:36,322 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

开放10083端口

使用Docker搭建项目管理系统-Redmine_第1张图片
首次登录用户名admin密码admin 登录后需要修改密码
使用Docker搭建项目管理系统-Redmine_第2张图片
使用Docker搭建项目管理系统-Redmine_第3张图片
创建用户
使用Docker搭建项目管理系统-Redmine_第4张图片
新建的用户可以正常登录并做一次修改密码,查看再绑定的邮箱地址
使用Docker搭建项目管理系统-Redmine_第5张图片

邮箱使用不了,需要修改相关配置邮箱,此处就不做了
使用Docker搭建项目管理系统-Redmine_第6张图片

你可能感兴趣的:(docker,docker,运维)