Back to home

搭建Redmine

参考

环境

10.5.0.20
~# cat /etc/issue
Ubuntu 14.04.3 LTS

获取redmine docker镜像

~#docker pull quay.io/sameersbn/redmine:latest

获取mysql docker镜像

~#docker pull quay.io/sameersbn/mysql:latest

启动mysql实例

~#mkdir /mnt/disk2/mysql/data

~#docker run --name=mysql-redmine -d \
--env='DB_NAME=redmine_production' \
--env='DB_USER=redmine' --env='DB_PASS=password' \
--volume=/mnt/disk2/mysql/data:/var/lib/mysql \
quay.io/sameersbn/mysql:latest

~#docker run -it --rm --volumes-from=mysql-redmine quay.io/sameersbn/mysql:latest mysql -uroot

关联mysql并启动redmine实例

~#mkdir /mnt/disk2/redmine/data

~#docker run --name=redmine -d \
--link=mysql-redmine:mysql \
--publish 443:443\
--env='REDMINE_HTTPS=true' \
--env='REDMINE_RELATIVE_URL_ROOT=/redmine' \
--volume=/mnt/disk2/redmine/data:/home/redmine/data \
quay.io/sameersbn/redmine:latest

访问

https://10.5.0.20/redmine


配置LDAP

http://www.worldhello.net/2010/01/22/370.html

配置插件

http://www.redmine.org/plugins

http://www.redmine.org.cn/436.html

修改bug

代码评审插件有bug

备份

#!/bin/bash

expect -c '
set timeout 3600
spawn rsync -ravz --delete /mnt/disk2/redmine/data zhanglong@10.65.50.7:/home/zhanglong/redmine_backup/redmine
expect "Password:"
send "xxxx\n\n"

spawn rsync -ravz --delete /mnt/disk2/mysql/data zhanglong@10.65.50.7:/home/zhanglong/redmine_backup/mysql
expect "Password:"
send "xxxx\n\n"

spawn rsync -ravz --delete /mnt/disk2/jenkins/data zhanglong@10.65.50.7:/home/zhanglong/redmine_backup/jenkins
expect "Password:"
send "xxxx\n\n"

#interact
expect eof
exit
'