1.下载
禅道官网下载 - 禅道最新版本软件下载-b版 - 禅道项目管理软件
docker pull hub.zentao.net/app/zentao:21.0
2.编写文件
1.docker-compose.yml
version: '2'
services:
# zentao service
zentao:
image: hub.zentao.net/app/zentao:21.0
container_name: zentao2
ports:
- '18000:80'
- '13306:3306'
volumes:
- /opt/zentao2/zentaodata:/data
environment:
- MYSQL_INTERNAL=true #默认用户名为 root,密码是 123456
networks:
- zentao-net2
networks:
zentao-net2:
driver: bridge
#启动
docker-compose up -d
2.设置远程连接
#进入容器
docker exec -it zentao2 /bin/bash
#进入数据库
mysql -uroot -p
use mysql
#授权
grant all on *.* to root@'%' identified by '123456' with grant option;
flush privileges;
#参考!
root@17643681f777:/apps/zentao# mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1199
Server version: 10.6.19-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> grant all on *.* to root@'%' identified by '123456' with grant option;
3.备份恢复
1.找到备份文件的路径
2.整理备份SQL
#恢复数据库
mysql -uroot -p zentao < xxxxx.sql --default-character-set=utf8
#回车输入密码
3.copy资源文件
4.修改logo
[root@sgrsfil1 zentaodata]# docker cp zt-login-logo.svg zentao2:/apps/zentao/www/theme/default/images/main/zt-login-logo.svg
Successfully copied 37.9kB to zentao2:/apps/zentao/www/theme/default/images/main/zt-login-logo.svg
5.大屏报错
[root@sgrsfil1 zentao2]# docker cp ./model.php zentao2:/apps/zentao/module/screen/model.php
Successfully copied 126kB to zentao2:/apps/zentao/module/screen/model.php
6.禅道升级
docker-compose stop
vi docker-compose.yml 将18.5改成21.0
docker-compose up -d