-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
116 lines (105 loc) · 3.04 KB
/
compose.yaml
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
x-mammoth: &mammoth
build: &mammoth_build
context: .
dockerfile: docker/mammoth.Dockerfile
env_file: '.env'
command: npm run start
depends_on:
migrations:
condition: service_completed_successfully
x-world: &world
<<: *mammoth
build:
<<: *mammoth_build
args:
PACKAGE: 'world'
volumes:
- ${DATA_VOLUME_DIR}:/app/data
services:
nginx:
container_name: mammoth-nginx
image: nginx:1.27-alpine
volumes:
- ${ASSETS_VOLUME_DIR}:/usr/share/nginx/html
- ./config/nginx.conf.template:/etc/nginx/templates/default.conf.template
environment:
API_PORT: ${API_PORT}
NGINX_PORT: ${NGINX_PORT}
ports:
- "${NGINX_PORT}:${NGINX_PORT}"
depends_on:
- api
mariadb:
container_name: mammoth-mariadb
image: mariadb:11.4
volumes:
- mammoth-mariadb-data:/var/lib/mysql
environment:
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
healthcheck:
test: sh -c "healthcheck.sh --connect --innodb_initialized"
interval: 3s
retries: 30
redis:
container_name: mammoth-redis
image: redis:7.4-alpine
command: redis-server --requirepass ${REDIS_PASSWORD}
migrations:
container_name: mammoth-migrations
build:
context: .
dockerfile: docker/migrations.Dockerfile
environment:
DATABASE_URL: ${DATABASE_URL}
command: prisma migrate deploy
depends_on:
mariadb:
condition: service_healthy
websockify:
container_name: mammoth-websockify
build:
context: .
dockerfile: docker/websockify.Dockerfile
volumes:
- ./scripts/websockify.sh:/app/websockify.sh
env_file: .env
command: sh -c "./websockify.sh"
ports:
- "${WS_JOIN_PORT}:${WS_JOIN_PORT}"
- "${WS_BLIZZARD_PORT}:${WS_BLIZZARD_PORT}"
api:
<<: *mammoth
container_name: mammoth-api
build:
<<: *mammoth_build
args:
PACKAGE: 'api'
join:
<<: *mammoth
container_name: mammoth-join
build:
<<: *mammoth_build
args:
PACKAGE: 'join'
ports:
- "${JOIN_PORT}:${JOIN_PORT}"
policy:
<<: *mammoth
container_name: mammoth-policy
build:
<<: *mammoth_build
args:
PACKAGE: 'policy'
ports:
- "${POLICY_PORT}:${POLICY_PORT}"
blizzard:
<<: *world
container_name: mammoth-blizzard
command: npm run start -- -i 100 -n Blizzard -p ${BLIZZARD_PORT}
ports:
- "${BLIZZARD_PORT}:${BLIZZARD_PORT}"
volumes:
mammoth-mariadb-data: