-
Notifications
You must be signed in to change notification settings - Fork 287
/
docker-compose.yml
257 lines (244 loc) · 6.58 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
version: "3"
services:
mysql:
# 如果需要在ARM架构上运行,可以使用 mariadb:10.5.8 镜像
image: mysql:5.7.24
# image: mariadb:10.5.8 # For ARM
command:
[
"--log-bin=mysql-bin",
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
"--innodb_flush_log_at_trx_commit=1",
"--sync_binlog=1",
"--server-id=1"
]
environment:
MYSQL_DATABASE: "codedog_db"
MYSQL_ROOT_PASSWORD: "TCA!@#2021"
volumes:
- ./.docker_data/mysql:/var/lib/mysql
- ./server/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
expose:
- "3306"
restart: always
redis:
image: redis:5.0.5
command: redis-server
volumes:
- ./.docker_data/redis:/data
expose:
- "6379"
restart: always
main-server:
env_file:
- ./server/dockerconfs/.env.local
image: tencenttca/tca-main:latest
build:
context: ./server/projects/main
dockerfile: ../../dockerconfs/Dockerfile-common-${ORIGIN:-mirror}
command:
[
"gunicorn",
"codedog.wsgi",
"-c",
"main.gunicorn.conf.py"
]
volumes:
- ./server/configs/django/local_main.py:/var/www/django/codedog/codedog/settings/local.py
- ./.docker_data/logs/main_server:/var/www/django/codedog/log
expose:
- "8001"
depends_on:
- mysql
- redis
main-worker:
env_file:
- ./server/dockerconfs/.env.local
image: tencenttca/tca-main:latest
command:
[
"celery",
"-A",
"codedog",
"worker",
"--concurrency=2",
"-l",
"INFO"
]
volumes:
- ./server/configs/django/local_main.py:/var/www/django/codedog/codedog/settings/local.py
- ./.docker_data/logs/main_worker:/var/www/django/codedog/log
healthcheck:
test: ["CMD-SHELL", "bash bin/healthy_check.sh"]
interval: 60s
restart: always
depends_on:
- mysql
- redis
main-beat:
env_file:
- ./server/dockerconfs/.env.local
image: tencenttca/tca-main:latest
command:
[
"celery",
"-A",
"codedog",
"beat",
"-S",
"redbeat.RedBeatScheduler",
"-l",
"INFO"
]
volumes:
- ./server/configs/django/local_main.py:/var/www/django/codedog/codedog/settings/local.py
- ./.docker_data/logs/main_beat:/var/www/django/codedog/log
depends_on:
- mysql
- redis
restart: on-failure
analysis-server:
env_file:
- ./server/dockerconfs/.env.local
image: tencenttca/tca-analysis:latest
build:
context: ./server/projects/analysis
dockerfile: ../../dockerconfs/Dockerfile-common-${ORIGIN:-mirror}
command:
[
"gunicorn",
"codedog.wsgi",
"-c",
"analysis.gunicorn.conf.py"
]
volumes:
- ./server/configs/django/local_analysis.py:/var/www/django/codedog/codedog/settings/local.py
- ./.docker_data/logs/analysis_server:/var/www/django/codedog/log
expose:
- "8002"
depends_on:
- mysql
- redis
analysis-worker:
env_file:
- ./server/dockerconfs/.env.local
image: tencenttca/tca-analysis:latest
command:
[
"celery",
"-A",
"codedog",
"worker",
"--concurrency=2",
"-l",
"INFO"
]
volumes:
- ./server/configs/django/local_analysis.py:/var/www/django/codedog/codedog/settings/local.py
- ./.docker_data/logs/analysis_worker:/var/www/django/codedog/log
healthcheck:
test: ["CMD-SHELL", "bash bin/healthy_check.sh"]
interval: 60s
depends_on:
- mysql
- redis
login-server:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/login
dockerfile: ../../dockerconfs/Dockerfile-common-${ORIGIN:-mirror}
image: tencenttca/tca-login:latest
command:
[
"gunicorn",
"apps.wsgi",
"-c",
"login.gunicorn.conf.py"
]
volumes:
- ./server/configs/django/local_login.py:/var/www/django/codedog/apps/settings/local.py
- ./.docker_data/logs/login:/var/www/django/codedog/log
expose:
- "8003"
depends_on:
- mysql
file-server:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/file
dockerfile: ../../dockerconfs/Dockerfile-common-${ORIGIN:-mirror}
image: tencenttca/tca-file:latest
command:
[
"gunicorn",
"codedog_file_server.wsgi",
"-c",
"file.gunicorn.conf.py"
]
volumes:
- ./server/configs/django/local_file.py:/var/www/django/codedog/codedog_file_server/env/local.py
- ./.docker_data/filedata:/var/www/django/codedog/data
- ./.docker_data/logs/file_server:/var/www/django/codedog/log
expose:
- "8804"
depends_on:
- mysql
file-nginx:
image: nginx:1.13.7
volumes:
- ./server/configs/nginx/tca_file_local_compose.conf:/etc/nginx/conf.d/tca_file_local_compose.conf
- ./.docker_data/logs/file_nginx:/var/log/nginx
expose:
- "8004"
depends_on:
- file-server
scmproxy:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/scmproxy
dockerfile: ../../dockerconfs/Dockerfile-common-${ORIGIN:-mirror}
image: tencenttca/tca-scmproxy:latest
command: [ "python", "proxyserver.py" ]
volumes:
- ./.docker_data/logs/scmproxy:/var/www/django/codedog/logs
expose:
- "8009"
nginx:
build:
context: ./web/tca-deploy-source
dockerfile: ../../server/dockerconfs/Dockerfile-nginx-${ORIGIN:-mirror}
env_file:
- ./web/tca-deploy-source/docker_conf/.env
volumes:
- ./.docker_data/logs/nginx:/var/log/nginx
- ./web/tca-deploy-source:/data/tca-deploy-source
- ./server/configs/nginx/tca_8000_compose.conf:/etc/nginx/conf.d/tca_8000_compose.conf
entrypoint: bash /data/tca-deploy-source/scripts/deploy.sh init
ports:
- "80:80"
- "8000:8000"
depends_on:
- main-server
- analysis-server
- login-server
- file-server
client:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./client
dockerfile: Dockerfile
image: tencenttca/tca-client:latest
command:
- /bin/bash
- -c
- |
python3 codepuppy.py start -t $$CODEDOG_TOKEN
volumes:
- ./tools/:/workspace/tools/
- ./client/config.ini:/workspace/client/config.ini
- ./.docker_data/client/appdata:/workspace/client/.appdata