-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
105 lines (100 loc) · 2.64 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
services:
caddy:
image: caddy:2.8.4-alpine
restart: unless-stopped
container_name: vue-game-caddy
volumes:
- ./docker/Caddyfile:/etc/caddy/Caddyfile
- ./data/caddy_data:/data
- ./data/caddy_config:/config
ports:
- 80:80
depends_on:
api:
condition: service_healthy
api:
build:
context: .
dockerfile: docker/api/Dockerfile
volumes:
- ./api:/home/node/api
depends_on:
mongodb:
condition: service_healthy
mariadb:
condition: service_healthy
stdin_open: true
tty: true
restart: unless-stopped
environment:
ENV: "development"
MARIADB_DATABASE: "${MARIADB_DATABASE:?err}"
MARIADB_USERNAME: "${MARIADB_ROOT_USERNAME:?err}"
MARIADB_PASSWORD: "${MARIADB_ROOT_PASSWORD:?err}"
MARIADB_HOST: "mariadb"
MARIADB_PORT: 3306
MONGODB_USERNAME: "${MONGO_INITDB_ROOT_USERNAME:?err}"
MONGODB_PASSWORD: "${MONGO_INITDB_ROOT_PASSWORD:?err}"
MONGODB_HOST: "mongodb"
container_name: vue-game-api
healthcheck:
test: wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/healthz || exit 1
interval: 10s
timeout: 20s
retries: 5
start_period: 60s
front:
build:
context: .
dockerfile: docker/front/Dockerfile
volumes:
- ./front:/home/node/front
depends_on:
api:
condition: service_healthy
stdin_open: true
tty: true
restart: unless-stopped
container_name: vue-game-front
mongodb:
image: mongo
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: "${MONGO_INITDB_ROOT_USERNAME:?err}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGO_INITDB_ROOT_PASSWORD:?err}"
ports:
- "27017:27017"
volumes:
- ./data/db:/data/db
container_name: vue-game-mongodb
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/ping --quiet
interval: 10s
timeout: 20s
retries: 5
start_period: 60s
mariadb:
image: mariadb:10.10.2
restart: unless-stopped
container_name: vue-game-mariadb
volumes:
- ./data/mysql:/var/lib/mysql
environment:
MARIADB_ROOT_PASSWORD: "${MARIADB_ROOT_PASSWORD:?err}"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 10s
timeout: 20s
retries: 5
start_period: 60s
phpmyadmin:
image: phpmyadmin
restart: unless-stopped
container_name: vue-game-phpmyadmin
depends_on:
mariadb:
condition: service_healthy
environment:
PMA_ARBITRARY: 1
UPLOAD_LIMIT: 512M
MAX_EXECUTION_TIME: 300