forked from apitable/apitable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
326 lines (311 loc) Β· 7.64 KB
/
docker-compose.yaml
File metadata and controls
326 lines (311 loc) Β· 7.64 KB
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
version: '3'
services:
web-server:
image: ${IMAGE_REGISTRY}/${IMAGE_WEB_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
expose:
- 8080
env_file:
- "${ENV_FILE:-.env}"
networks:
- apitable
depends_on:
backend-server:
condition: service_healthy
imageproxy-server:
image: ${IMAGE_REGISTRY}/${IMAGE_IMAGEPROXY_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
expose:
- "8080"
environment:
- TZ=${TIMEZONE}
- BASEURL=${MINIO_ENDPOINT}
networks:
- apitable
backend-server:
image: ${IMAGE_REGISTRY}/${IMAGE_BACKEND_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
ports:
- "8081:8081"
env_file:
- "${ENV_FILE:-.env}"
expose:
- "8081"
environment:
- TZ=${TIMEZONE}
- OSS_TYPE=aws
networks:
- apitable
depends_on:
- mysql
- redis
- socket-server
- minio
- rabbitmq
healthcheck:
test: ["CMD-SHELL", "curl -sS 'http://localhost:8081' || exit 1"]
interval: 30s
timeout: 10s
retries: 10
room-server:
image: ${IMAGE_REGISTRY}/${IMAGE_ROOM_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
#ports:
# - 3333:3333
# - 3334:3334
expose:
- "3333"
- "3334"
env_file:
- "${ENV_FILE:-.env}"
environment:
- NODE_ENV=${ENV}
- NODE_OPTIONS=--max-old-space-size=2048 --max-http-header-size=80000
- API_MAX_MODIFY_RECORD_COUNTS=${API_MAX_MODIFY_RECORD_COUNTS:-30}
- INSTANCE_MAX_MEMORY=4096M
networks:
- apitable
depends_on:
- redis
- mysql
scheduler-server:
image: ${IMAGE_REGISTRY}/${IMAGE_ROOM_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
#ports:
# - 3333:3333
# - 3334:3334
expose:
- "3333"
- "3334"
env_file:
- "${ENV_FILE:-.env}"
environment:
- NODE_ENV=${ENV}
- NODE_OPTIONS=--max-old-space-size=2048 --max-http-header-size=80000
- API_MAX_MODIFY_RECORD_COUNTS=${API_MAX_MODIFY_RECORD_COUNTS:-30}
- INSTANCE_MAX_MEMORY=4096M
- APPLICATION_NAME=SCHEDULE_SERVER
# only one server opened
- ENABLE_SCHED=true
networks:
- apitable
depends_on:
- redis
- mysql
socket-server:
image: ${IMAGE_REGISTRY}/${IMAGE_SOCKET_SERVER}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
# ports:
# - 3001:3001
# - 3002:3002
# - 3005:3005
expose:
- "3001"
- "3002"
- "3005"
- "3007"
environment:
- PORT=3001
- NOTIFICATION_PORT=3002
- SYS_MEMORY_RATIO=100
- NODE_MEMORY_RATIO=80
- NEST_GRPC_URL=room-server:3334
env_file:
- "${ENV_FILE:-.env}"
networks:
- apitable
depends_on:
- redis
- rabbitmq
### Third Party Dockers
gateway:
image: ${IMAGE_GATEWAY}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
ports:
- ${NGINX_HTTP_PORT:-80}:80
- ${NGINX_HTTPS_PORT:-443}:443
volumes:
- ./gateway/conf.d:/etc/nginx/conf.d
environment:
- TZ=${TIMEZONE}
networks:
- apitable
depends_on:
mysql:
condition: service_started
minio:
condition: service_started
backend-server:
condition: service_started
room-server:
condition: service_started
socket-server:
condition: service_started
imageproxy-server:
condition: service_started
web-server:
condition: service_started
init-data-mysql:
condition: service_completed_successfully
init-data-minio:
condition: service_completed_successfully
minio:
image: ${IMAGE_MINIO}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
user: "${UID}:${GID}"
command: server /data
ports:
- "9000:9000"
expose:
- "9000"
volumes:
- ${DATA_PATH}/.data/minio/data:/data
- ${DATA_PATH}/.data/minio/config:/root/.minio
environment:
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
- TZ=${TIMEZONE}
networks:
- apitable
healthcheck:
test: ["CMD-SHELL", "curl -sS 'http://localhost:9000' || exit 1"]
interval: 30s
timeout: 10s
retries: 5
redis:
image: ${IMAGE_REDIS}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
user: "${UID}:${GID}"
command:
[
"redis-server",
"--appendonly",
"yes",
"--requirepass",
"${REDIS_PASSWORD}",
]
ports:
- "6379:6379"
expose:
- "6379"
volumes:
- ${DATA_PATH}/.data/redis:/data
environment:
- TZ=${TIMEZONE}
networks:
- apitable
mysql:
image: ${IMAGE_MYSQL}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
user: "${UID}:${GID}"
volumes:
- ${DATA_PATH}/.data/mysql:/var/lib/mysql
ports:
- 3306:3306
expose:
- "3306"
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- TZ=${TIMEZONE}
command: --default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--sql_mode=IGNORE_SPACE,NO_ENGINE_SUBSTITUTION
--lower_case_table_names=2
healthcheck:
test: "mysql ${MYSQL_DATABASE} -u${MYSQL_USERNAME} -p${MYSQL_PASSWORD} -e 'SELECT 1;'"
interval: 30s
timeout: 10s
retries: 10
networks:
- apitable
rabbitmq:
image: ${IMAGE_RABBITMQ}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
restart: always
user: "${UID}:${GID}"
volumes:
- ${DATA_PATH}/.data/rabbitmq:/var/lib/rabbitmq
ports:
- "5671:5671"
- "5672:5672"
- "15672:15672"
expose:
- "5671"
- "5672"
- "15672"
environment:
- RABBITMQ_USERNAME=${RABBITMQ_USERNAME}
- RABBITMQ_PASSWORD=${RABBITMQ_PASSWORD}
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
networks:
- apitable
# #### init data
init-db:
image: ${IMAGE_REGISTRY}/${IMAGE_INIT_DB}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
environment:
- TZ=${TIMEZONE}
- DB_HOST=${MYSQL_HOST}
- DB_PORT=${MYSQL_PORT}
- DB_NAME=${MYSQL_DATABASE}
- DB_USERNAME=${MYSQL_USERNAME}
- DB_PASSWORD=${MYSQL_PASSWORD}
- DATABASE_TABLE_PREFIX=${DATABASE_TABLE_PREFIX}
- ACTION=update
networks:
- apitable
depends_on:
mysql:
condition: service_healthy
init-data-mysql:
image: ${IMAGE_REGISTRY}/${IMAGE_INIT_DATA_MYSQL}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
environment:
- TZ=${TIMEZONE}
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_PORT=${MYSQL_PORT}
- MYSQL_USERNAME=${MYSQL_USERNAME}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
env_file:
- "${ENV_FILE:-.env}"
networks:
- apitable
depends_on:
mysql:
condition: service_healthy
init-db:
condition: service_completed_successfully
command:
- /bin/bash
- -c
- |
sh run.sh
init-data-minio:
image: ${IMAGE_REGISTRY}/${IMAGE_INIT_DATA_MINIO}
pull_policy: ${IMAGE_PULL_POLICY:-missing}
environment:
- TZ=${TIMEZONE}
env_file:
- "${ENV_FILE:-.env}"
networks:
- apitable
depends_on:
minio:
condition: service_healthy
networks:
apitable:
driver: bridge