forked from azerothcore/acore-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
148 lines (135 loc) · 4.34 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
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
ac-eluna-ts-dev:
condition: service_started
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
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
image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-master}
restart: unless-stopped
privileged: true
user: ${DOCKER_USER:-acore}
ports:
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
volumes:
- ./scripts/lua:/azerothcore/env/dist/bin/lua_scripts/scripts
- ac-client-data:/azerothcore/env/dist/data:ro
depends_on:
ac-database:
condition: service_healthy
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:-master}
restart: unless-stopped
ports:
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
depends_on:
ac-database:
condition: service_healthy
ac-db-import:
condition: service_completed_successfully
ac-eluna-ts-dev:
image: acore/eluna-ts:${DOCKER_IMAGE_TAG:-master}
# the build:lib is done in the healthcheck
command: sh -c "cd /eluna-ts/modules && 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:-master}
volumes:
- ac-client-data:/azerothcore/env/dist/data
ac-db-import:
<<: *ac-shared-conf
image: acore/ac-wotlk-worldserver:${DOCKER_IMAGE_TAG:-master}
command: ./env/dist/bin/dbimport
tmpfs:
- /azerothcore/env/dist/temp
environment:
AC_DISABLE_INTERACTIVE: "1"
#profiles: [db-import]
ac-dev-server:
<<: *ac-shared-conf
tty: true
image: acore/ac-wotlk-dev-server:${DOCKER_IMAGE_TAG:-master}
ports:
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
profiles: [dev]
volumes:
- ac-dev-server:/azerothcore
ac-dev-tools:
<<: *ac-shared-conf
image: acore/ac-wotlk-tools:${DOCKER_IMAGE_TAG:-master}
user: root
working_dir: /azerothcore/env/client/
volumes:
- ${DOCKER_CLIENT_DATA_FOLDER:-./var/client}:/azerothcore/env/client/Data
- ${DOCKER_VOL_TOOLS_DBC:-./var/extractors/dbc}:/azerothcore/env/client/dbc
- ${DOCKER_VOL_TOOLS_MAPS:-./var/extractors/maps}:/azerothcore/env/client/maps
- ${DOCKER_VOL_TOOLS_VMAPS:-./var/extractors/vmaps}:/azerothcore/env/client/vmaps
- ${DOCKER_VOL_TOOLS_MMAPS:-./var/extractors/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-client-data:
networks:
ac-network: