-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yml
65 lines (62 loc) · 1.77 KB
/
deploy.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
version: '3.7'
services:
go-api:
image: ${TAG}
ports:
- ${PORT}:${PORT}
- ${MONITORING_PORT}:${MONITORING_PORT}
volumes:
- ${CACHE_DIR}:/cache
- ${CACHE_IMG_DIR}:/cache_img
- ${FILES_DIR}:/files
- ${FORUM_ATTACH_DIR}:/forum_attach
- ${BLOG_FILES_DIR}:/blog_files
networks:
- general
environment:
JWT_PUBLIC_KEY_FILE: /run/secrets/flgo_jwt_public_key
JWT_PRIVATE_KEY_FILE: /run/secrets/flgo_jwt_private_key
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_BUCKET: ${MINIO_BUCKET}
MINIO_SERVER: ${MINIO_SERVER}
PORT: ${PORT}
MONITORING_PORT: ${MONITORING_PORT}
DB_ADDRESS: ${DB_ADDRESS}
MC_ADDRESS: ${MC_ADDRESS}
RDS_ADDRESS: ${RDS_ADDRESS}
MYSQL_URL: ${MYSQL_URL}
SMTP_ADDRESS: ${SMTP_ADDRESS}
ELASTIC_APM_SERVER_URL: ${ELASTIC_APM_SERVER_URL}
ELASTIC_APM_SERVICE_NAME: ${ELASTIC_APM_SERVICE_NAME}
BASE_IMAGE_URL: ${BASE_IMAGE_URL}
BASE_MINIO_FILE_URL: ${BASE_MINIO_FILE_URL}
BASE_FORUM_MESSAGE_ATTACH_URL: ${BASE_FORUM_MESSAGE_ATTACH_URL}
BASE_FORUM_MESSAGE_DRAFT_ATTACH_URL: ${BASE_FORUM_MESSAGE_DRAFT_ATTACH_URL}
secrets:
- flgo_jwt_public_key
- flgo_jwt_private_key
healthcheck:
test: ['CMD', 'curl', '-sS', 'localhost:${PORT}/ping']
interval: 10s
timeout: 30s
retries: 3
deploy:
replicas: 2
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
networks:
general:
driver: overlay
secrets:
flgo_jwt_public_key:
external: true
flgo_jwt_private_key:
external: true