-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
executable file
·155 lines (148 loc) · 3.65 KB
/
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
version: '3.9'
services:
front:
build:
context: .
dockerfile: docker/svelte-kit/Dockerfile
ports:
- 5173:5173
volumes:
- ./front:/home/node/svelte-kit
stdin_open: true
tty: true
restart: unless-stopped
environment:
AUTH_API_URL: "${AUTH_API_URL:?err}"
USER_API_URL: "${USER_API_URL:?err}"
ARTICLE_API_URL: "${ARTICLE_API_URL:?err}"
container_name: mc-front
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:5173/api/healthz || exit 1
timeout: 30s
interval: 2s
retries: 30
auth:
build:
context: .
dockerfile: ./docker/node/Dockerfile
container_name: mc-auth
restart: unless-stopped
environment:
DATABASE_URL: "${AUTH_DB_URL:?err}"
USER_API_URL: "${USER_API_URL:?err}"
ARTICLE_API_URL: "${ARTICLE_API_URL:?err}"
JAEGER_URL: "${JAEGER_URL:?err}"
JWT_SECRET: "${JWT_SECRET:?err}"
PORT: 4000
insecure: true
volumes:
- ./auth-api:/home/node/api
stdin_open: true
tty: true
ports:
- 4002:4000
depends_on:
db:
condition: service_healthy
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
timeout: 30s
interval: 2s
retries: 30
user:
build:
context: .
dockerfile: ./docker/node/Dockerfile
container_name: mc-user
restart: unless-stopped
environment:
DATABASE_URL: "${USER_DB_URL:?err}"
AUTH_API_URL: "${AUTH_API_URL:?err}"
JAEGER_URL: "${JAEGER_URL:?err}"
JWT_SECRET: "${JWT_SECRET:?err}"
insecure: true
PORT: 4000
volumes:
- ./user-api:/home/node/api
stdin_open: true
tty: true
ports:
- 4001:4000
depends_on:
db:
condition: service_healthy
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
timeout: 30s
interval: 2s
retries: 30
article:
build:
context: .
dockerfile: ./docker/node/Dockerfile
container_name: mc-article
restart: unless-stopped
environment:
DATABASE_URL: "${ARTICLE_DB_URL:?err}"
AUTH_API_URL: "${AUTH_API_URL:?err}"
JAEGER_URL: "${JAEGER_URL:?err}"
JWT_SECRET: "${JWT_SECRET:?err}"
insecure: true
PORT: 4000
volumes:
- ./article-api:/home/node/api
stdin_open: true
tty: true
ports:
- 4000:4000
depends_on:
db:
condition: service_healthy
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
timeout: 30s
interval: 2s
retries: 30
tracing:
image: jaegertracing/all-in-one
container_name: mc-tracing
environment:
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
- COLLECTOR_OTLP_ENABLED=true
ports:
- 6832:6832/udp
- 6831:6831/udp
- 5778:5778
- 16686:16686
- 4317:4317
- 4318:4318
- 14250:14250
- 14268:14268
- 14269:14269
- 9411:9411
db:
image: mariadb:10.10.2
restart: unless-stopped
container_name: mc-db
volumes:
- ./data/mysql:/var/lib/mysql
environment:
MARIADB_ROOT_PASSWORD: "${MARIADB_ROOT_PASSWORD:?err}"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
timeout: 30s
interval: 2s
retries: 30
phpmyadmin:
image: phpmyadmin
restart: unless-stopped
container_name: mc-phpmyadmin
ports:
- 8080:80
depends_on:
db:
condition: service_healthy
environment:
PMA_ARBITRARY: 1
UPLOAD_LIMIT: 512M
MAX_EXECUTION_TIME: 300