forked from azerothcore/acore-docker
-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yml
204 lines (190 loc) · 6.16 KB
/
docker-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
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
version: "3.9"
# extension field: https://docs.docker.com/compose/compose-file/compose-file-v3/#extension-fields
x-networks: &networks
networks:
- ac-network
x-ac-shared-conf: &ac-shared-conf
<<: *networks
working_dir: /azerothcore
depends_on:
ac-database:
condition: service_healthy
services:
ac-database:
<<: *networks
image: mysql:8.0
restart: unless-stopped
cap_add:
- SYS_NICE # CAP_SYS_NICE
ports:
- ${DOCKER_DB_EXTERNAL_PORT:-63306}:3306
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=${DOCKER_DB_ROOT_PASSWORD:-password}
volumes:
- type: volume
source: ac-database
target: /var/lib/mysql
healthcheck:
test: '/usr/bin/mysql --user=root --password=$$MYSQL_ROOT_PASSWORD --execute "SHOW DATABASES;"'
interval: 2s
timeout: 40s
retries: 20
ac-worldserver:
container_name: acore-docker-ac-worldserver-1 # fixed container name to simplify the attach process
<<: *ac-shared-conf
stdin_open: true
tty: true
cap_add:
- SYS_NICE # CAP_SYS_NICE
image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-7.0.0-dev.0}
restart: unless-stopped
privileged: true
user: ${DOCKER_USER:-acore}
ports:
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
expose:
- 8085
volumes:
- ./scripts/lua:/azerothcore/env/dist/bin/lua_scripts/scripts
- ${DOCKER_VOL_TOOLS_DBC:-ac-client-data-dbc}:/azerothcore/env/dist/data/dbc:ro
- ${DOCKER_VOL_TOOLS_MAPS:-ac-client-data-maps}:/azerothcore/env/dist/data/maps:ro
- ${DOCKER_VOL_TOOLS_VMAPS:-ac-client-data-vmaps}:/azerothcore/env/dist/data/vmaps:ro
- ${DOCKER_VOL_TOOLS_MMAPS:-ac-client-data-mmaps}:/azerothcore/env/dist/data/mmaps:ro
depends_on:
ac-eluna-ts-dev:
condition: service_started
ac-client-data:
condition: service_started
ac-db-import:
condition: service_completed_successfully
ac-authserver:
<<: *ac-shared-conf
tty: true
image: acore/ac-wotlk-authserver:${DOCKER_IMAGE_TAG:-7.0.0-dev.0}
restart: unless-stopped
ports:
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
expose:
- 3724
depends_on:
ac-database:
condition: service_healthy
ac-db-import:
condition: service_completed_successfully
ac-eluna-ts-dev:
image: acore/eluna-ts:master
# the build:lib is done in the healthcheck
command: sh -c "cd /eluna-ts/modules && touch index.ts && npm install && cd /eluna-ts && npm run dev"
# small workaround to make the other services to wait for the eluna-ts build
healthcheck:
test: sh -c "cd /eluna-ts/modules/eluna-ts && npm run build:lib && npm run build"
timeout: 60s
retries: 10
interval: 5s
start_period: 10s
restart: unless-stopped
volumes:
# from typescript
- ./scripts/typescript:/eluna-ts/modules
# to lua
- ./scripts/lua:/eluna-ts/dist/
ac-client-data:
<<: *networks
image: acore/ac-wotlk-client-data:${DOCKER_IMAGE_TAG:-7.0.0-dev.0}
volumes:
- ${DOCKER_VOL_TOOLS_CAMERAS:-ac-client-data-cameras}:/azerothcore/env/dist/data/Cameras
- ${DOCKER_VOL_TOOLS_DBC:-ac-client-data-dbc}:/azerothcore/env/dist/data/dbc
- ${DOCKER_VOL_TOOLS_MAPS:-ac-client-data-maps}:/azerothcore/env/dist/data/maps
- ${DOCKER_VOL_TOOLS_VMAPS:-ac-client-data-vmaps}:/azerothcore/env/dist/data/vmaps
- ${DOCKER_VOL_TOOLS_MMAPS:-ac-client-data-mmaps}:/azerothcore/env/dist/data/mmaps
ac-db-import:
<<: *ac-shared-conf
image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-7.0.0-dev.0}
command: ./env/dist/bin/dbimport
environment:
AC_DISABLE_INTERACTIVE: "1"
#profiles: [db-import]
ac-dev-database:
image: mysql:8.0
restart: unless-stopped
profiles: [dev]
cap_add:
- SYS_NICE # CAP_SYS_NICE
ports:
- ${DOCKER_DB_EXTERNAL_PORT:-63300}:3306
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=${DOCKER_DB_ROOT_PASSWORD:-password}
volumes:
- type: volume
source: ac-dev-database
target: /var/lib/mysql
healthcheck:
test: '/usr/bin/mysql --user=root --password=$$MYSQL_ROOT_PASSWORD --execute "SHOW DATABASES;"'
interval: 2s
timeout: 40s
retries: 20
networks:
ac-dev-network:
aliases:
- ac-database # needed by the server *.conf file
ac-dev-server:
tty: true
privileged: true
user: root
image: acore/ac-wotlk-dev-server:${DOCKER_IMAGE_TAG:-7.0.0-dev.0}
environment:
DATAPATH: "/azerothcore/env/dist/data"
DOCKER_ETC_FOLDER: "env/docker/etc"
profiles: [dev]
volumes:
- ac-dev-server:/azerothcore
- ./var/shared:/azerothcore/var/shared
# network_mode: service:ac-dev-database
working_dir: /azerothcore
depends_on:
ac-dev-database:
condition: service_healthy
networks:
- ac-dev-network
ac-dev-tools:
<<: *ac-shared-conf
image: acore/ac-wotlk-tools:${DOCKER_IMAGE_TAG:-7.0.0-dev.0}
working_dir: /azerothcore/env/client/
cap_add:
- SYS_NICE # CAP_SYS_NICE
volumes:
- ${DOCKER_CLIENT_DATA_FOLDER:-./var/client}:/azerothcore/env/client/Data
- ${DOCKER_VOL_TOOLS_CAMERAS:-ac-client-data-cameras}:/azerothcore/env/dist/data/Cameras
- ${DOCKER_VOL_TOOLS_DBC:-ac-client-data-dbc}:/azerothcore/env/client/dbc
- ${DOCKER_VOL_TOOLS_MAPS:-ac-client-data-maps}:/azerothcore/env/client/maps
- ${DOCKER_VOL_TOOLS_VMAPS:-ac-client-data-vmaps}:/azerothcore/env/client/vmaps
- ${DOCKER_VOL_TOOLS_MMAPS:-ac-client-data-mmaps}:/azerothcore/env/client/mmaps
profiles: [dev]
phpmyadmin:
<<: *networks
image: phpmyadmin
ports:
- 8080:80
environment:
- PMA_ARBITRARY=1
profiles: [dev]
volumes:
ac-database:
ac-dev-server:
ac-dev-database:
ac-client-data-cameras:
ac-client-data-dbc:
ac-client-data-maps:
ac-client-data-vmaps:
ac-client-data-mmaps:
networks:
ac-network:
ac-dev-network: