forked from AAEmu/AAEmu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
114 lines (109 loc) · 3.93 KB
/
docker-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
# If you want to use a Docker Volume :
# Uncomment the line "db_data:/var/lib/mysql" and comment the line "./.server_files/AAEmu.Database/mysql:/var/lib/mysql" that are in the db services
# Also uncomment the two volumes line at the end... This is useful if you use WSL Shell on Windows to launch the compose file.
services:
db:
image: mysql:8.0.36
restart: unless-stopped
# command: --default_authentication_plugin=mysql_native_password
volumes:
- ./SQL/aaemu_login.sql:/docker-entrypoint-initdb.d/aaemu_login.sql
- ./SQL/aaemu_game.sql:/docker-entrypoint-initdb.d/aaemu_game.sql
- ./SQL/examples/example-server.sql:/docker-entrypoint-initdb.d/example-server.sql
- ./.server_files/AAEmu.Database/mysql:/var/lib/mysql
# - db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
ports:
- 3306:3306
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p${DB_PASSWORD}" ]
interval: 5s
timeout: 5s
retries: 20
adminer:
image: adminer
restart: unless-stopped
environment:
ADMINER_DEFAULT_DB_DRIVER: mysql
ADMINER_DEFAULT_DB_HOST: db
ADMINER_DESIGN: nette
ports:
- 8080:8080
depends_on:
db:
condition: service_healthy
login:
build:
context: .
dockerfile: ./AAEmu.Login/Dockerfile
args:
- CONFIGURATION=${BUILD_CONFIGURATION}
- FRAMEWORK=${BUILD_FRAMEWORK}
- RUNTIME=${BUILD_RUNTIME}
- DB_HOST=db
- DB_PORT=3306
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
image: aaemu-login:${PROJECT_VERSION_PREFIX}-${PROJECT_VERSION_SUFFIX}
restart: unless-stopped
volumes:
- "./.server_files/AAEmu.Login/Config.json:/app/Config.json:ro"
environment:
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
ports:
- 1237:1237
develop:
watch:
- path: ./AAEmu.Login
action: rebuild
healthcheck:
test: ["CMD-SHELL", "mysql aaemu_login -h db -u root -p${DB_PASSWORD}"]
interval: 5s
timeout: 5s
retries: 20
depends_on:
db:
condition: service_healthy
game:
build:
context: .
dockerfile: ./AAEmu.Game/Dockerfile
args:
- CONFIGURATION=${BUILD_CONFIGURATION}
- FRAMEWORK=${BUILD_FRAMEWORK}
- RUNTIME=${BUILD_RUNTIME}
- DB_HOST=db
- DB_PORT=3306
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- LOGIN_HOST=login
- LOGIN_PORT=1234
image: aaemu-game:${PROJECT_VERSION_PREFIX}-${PROJECT_VERSION_SUFFIX}
restart: unless-stopped
volumes:
- "./.server_files/AAEmu.Game/ClientData:/app/ClientData:ro"
- "./.server_files/AAEmu.Game/Data:/app/Data:ro"
- "./.server_files/AAEmu.Game/Configurations:/app/Configurations:ro"
- "./.server_files/AAEmu.Game/Config.json:/app/Config.json:ro"
environment:
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
ports:
- 1239:1239
- 1250:1250
develop:
watch:
- path: ./AAEmu.Game
action: rebuild
healthcheck:
test: ["CMD-SHELL", "mysql aaemu_game -h db -u root -p${DB_PASSWORD}"]
interval: 5s
timeout: 5s
retries: 20
depends_on:
db:
condition: service_healthy
login:
condition: service_healthy
# volumes:
# db_data: