11services :
2+ zentao-db :
3+ image : hub.zentao.net/app/mysql:8.0.36-debian
4+ container_name : zentao-db
5+ ports :
6+ - ' 3306:3306'
7+ volumes :
8+ - /data/zentao-mysql:/var/lib/mysql
9+ environment :
10+ - MYSQL_ROOT_PASSWORD=pass4Zentao
11+ - MYSQL_DATABASE=zentao
12+ networks :
13+ - zentao-net
14+ healthcheck :
15+ test : ["CMD-SHELL", "mysqladmin ping -h127.0.0.1 -uroot -p$$MYSQL_ROOT_PASSWORD"]
16+ interval : 3s
17+ timeout : 3s
18+ retries : 10
19+ start_period : 20s
20+ zentao :
21+ image : hub.zentao.net/test/gitfox-front:4.4
22+ container_name : zentao
23+ ports :
24+ - ' 80:80'
25+ volumes :
26+ - /data/zentao-file:/data
27+ depends_on :
28+ zentao-db :
29+ condition : service_healthy
30+ environment :
31+ - ZT_MYSQL_HOST=zentao-db
32+ - ZT_MYSQL_PORT=3306
33+ - ZT_MYSQL_USER=root
34+ - ZT_MYSQL_PASSWORD=pass4Zentao
35+ - ZT_MYSQL_DB=zentao
36+ - PHP_MAX_EXECUTION_TIME=120
37+ - PHP_MEMORY_LIMIT=512M
38+ - PHP_POST_MAX_SIZE=128M
39+ - PHP_UPLOAD_MAX_FILESIZE=128M
40+ - ZT_GITFOX_PORT=3000
41+ - ZT_GITFOX_URL=3000
42+ - ZT_GITFOX_URL=3000
43+ - IS_CONTAINER=true
44+ networks :
45+ - zentao-net
246 gitfox :
3- image : hub.zentao.net/app/ gitfox-community:2.1-20260904
47+ image : gitfox-server:4.4-20261104
448 container_name : gitfox
5- restart : unless-stopped
649 ports :
7- - " 3000:3000"
8- - " 3322:3322"
9- environment :
10- GITFOX_SERVER_PROTO : http
11- GITFOX_SERVER_HOST : example.com
12- GITFOX_REPO_URL_EXPOSE_PORT : true
13- GITFOX_HTTP_PORT : 3000
14- GITFOX_SSH_PORT : 3322
15- GITFOX_DEVOPS_URL : http://example.com/api.php/v1
16- # GITFOX_DB_DATASOURCE: user:password@tcp(mysql:3306)/gitfox-community?parseTime=true&loc=Local
17-
18- GITFOX_DB_DRIVER : mysql
19- GITFOX_DB_HOST : mysql
20- GITFOX_DB_PORT : 3306
21- GITFOX_DB_USER : gitfox
22- GITFOX_DB_PASSWORD : please_change
23- GITFOX_DB_NAME : gitfox
24- GITFOX_DB_TIMEZONE : Asia/Shanghai
50+ - ' 3000:3000'
51+ - ' 3322:3322'
2552 volumes :
26- - gitfox-data:/data
53+ - /data/zentao-file:/data
54+ - /var/run/docker.sock:/var/run/docker.sock
55+ depends_on :
56+ zentao-db :
57+ condition : service_healthy
58+ environment :
59+ - GITFOX_SERVER_PROTO=http
60+ - GITFOX_SERVER_HOST=example.com # 当前服务器地址
61+ - GITFOX_REPO_URL_EXPOSE_PORT=true
62+ - GITFOX_HTTP_PORT=3000
63+ - GITFOX_SSH_PORT=3322
64+ - GITFOX_DEVOPS_URL=http://example.com/api.php/v1 # 禅道服务器地址
65+ - GITFOX_DB_DRIVER=mysql
66+ - GITFOX_DB_HOST=zentao-db
67+ - GITFOX_DB_PORT=3306
68+ - GITFOX_DB_USER=root
69+ - GITFOX_DB_PASSWORD=pass4Zentao
70+ - GITFOX_DB_NAME=zentao
71+ - GITFOX_DB_TIMEZONE=Asia/Shanghai
2772 healthcheck :
28- test : ["CMD", "curl", "-fsS", "http://localhost :3000/public/health"]
73+ test : ["CMD", "curl", "-fsS", "http://127.0.0.1 :3000/public/health"]
2974 interval : 5s
3075 timeout : 1s
3176 retries : 1
3277 start_period : 30s
33- deploy :
34- resources :
35- limits :
36- cpus : " 1.0"
37- memory : 1g
38-
39- volumes :
40- gitfox-data :
78+ networks :
79+ - zentao-net
80+ networks :
81+ zentao-net :
82+ driver : bridge
0 commit comments