forked from Tencent/CodeAnalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
209 lines (198 loc) · 4.86 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
version: "3"
services:
mysql:
image: mysql:5.7.24
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
build:
context: ./server/projects/main
dockerfile: ../../dockerconfs/Dockerfile-common # 相对于main目录的位置
command:
[
"gunicorn",
"codedog.wsgi",
"-c",
"main.gunicorn.conf.py"
]
volumes:
- ./server/configs/django/local_main.py:/var/www/django/codedog/codedog/settings/local.py
expose:
- "8001"
depends_on:
- mysql
- redis
main-worker:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/main
dockerfile: ../../dockerconfs/Dockerfile-common
command:
[
"celery",
"-A",
"codedog",
"worker",
"--concurrency=2",
"-l",
"INFO"
]
volumes:
- ./server/configs/django/local_main.py:/var/www/django/codedog/codedog/settings/local.py
depends_on:
- mysql
- redis
main-beat:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/main
dockerfile: ../../dockerconfs/Dockerfile-common
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
depends_on:
- mysql
- redis
analysis-server:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/analysis
dockerfile: ../../dockerconfs/Dockerfile-common
command:
[
"gunicorn",
"codedog.wsgi",
"-c",
"analysis.gunicorn.conf.py"
]
volumes:
- ./server/configs/django/local_analysis.py:/var/www/django/codedog/codedog/settings/local.py
expose:
- "8002"
depends_on:
- mysql
- redis
analysis-worker:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/analysis
dockerfile: ../../dockerconfs/Dockerfile-common
command:
[
"celery",
"-A",
"codedog",
"worker",
"--concurrency=2",
"-l",
"INFO"
]
volumes:
- ./server/configs/django/local_analysis.py:/var/www/django/codedog/codedog/settings/local.py
depends_on:
- mysql
- redis
login-server:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/login
dockerfile: ../../dockerconfs/Dockerfile-common
command:
[
"gunicorn",
"apps.wsgi",
"-c",
"login.gunicorn.conf.py"
]
volumes:
- ./server/configs/django/local_login.py:/var/www/django/codedog/apps/settings/local.py
expose:
- "8003"
depends_on:
- mysql
file-server:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/file
dockerfile: ../../dockerconfs/Dockerfile-common
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
expose:
- "8804"
depends_on:
- mysql
scmproxy:
env_file:
- ./server/dockerconfs/.env.local
build:
context: ./server/projects/scmproxy
dockerfile: ../../dockerconfs/Dockerfile-common # 相对于scmproxy目录的位置
command: [ "python", "proxyserver.py" ]
nginx:
build:
context: ./web/tca-deploy-source
dockerfile: ../../server/dockerconfs/Dockerfile-nginx
env_file:
- ./web/tca-deploy-source/docker_conf/.env
volumes:
- ./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/init.sh
ports:
- "80:80"
- "8000:8000"
depends_on:
- main-server
- analysis-server
- login-server
- file-server