docker部署禅道
方法一:
docker pull idoop/zentao:latest
mkdir -p /data/zbox
docker run -d -p 80:80 -p 3326:3306 -e USER="admin" -e PASSWD="123456" -e BIND_ADDRESS="false" -e SMTP_HOST="请写smtp地址" -e ZENTAO_VER="12.3.stable" -v /data/zbox/:/opt/zbox/ --name zentao-server idoop/zentao:latest
这里需要增加指定的版本为12.3.stable,
如果不加,重启容器会提示
安全起见,请删除 /opt/zbox/app/zentao/www 目录下的 upgrade.php 文件。
删除upgrade.php 文件后提示找不到/zbox/
可先备份/data/zbox,再重新开启容器
docker pull idoop/zentao:latest
mkdir -p /data/zbox_new
docker run -d -p 80:80 -p 3326:3306 -e USER="admin" -e PASSWD="123456" -e BIND_ADDRESS="false" -e SMTP_HOST="请写smtp地址" -e ZENTAO_VER="12.3.stable" -v /data/zbox_new/:/opt/zbox/ --name zentao-server1 idoop/zentao:latest
- 迁移附件的物理文件,将/zbox/app/upload/1目录下的文件,迁移到/data/zbox_new/app/zentao/www/data/upload/1/目目录下
- 将/data/zbox_new/data/mysql目录下的数据库物理文件删除
- 迁移数据库物理文件,将/data/zbox/data/mysql目录下的文件,迁移到/data/zbox_new/data/mysql目录下,并且执行 chmod -R 660 /data/zbox_new/data/mysql
方法二:
docker run --name zentao -p 80:80 -v /app/zentaopms:/app/zentaopms -v /app/mysqldata:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d easysoft/zentao:12.3.1
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!