-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 2.05 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (68 loc) · 2.05 KB
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
# =============================================================================
# docker-compose.yml — NetworkModuleTest multi-service setup
# =============================================================================
# Services:
# dbserver — Database server (port 18002)
# testserver — Game server (port 19010, connects to dbserver)
# testclient — Test client (connects to testserver)
#
# Usage:
# docker-compose up # Start all services
# docker-compose up dbserver # Start DB server only
# docker-compose up testserver # Start game server only
# docker-compose run testclient # Run test client once
# docker-compose down # Stop all services
# =============================================================================
services:
dbserver:
build:
context: .
dockerfile: Dockerfile
image: networkmodule-test:latest
container_name: netmod-dbserver
command: /app/bin/TestDBServer -p 18002 -l Info
ports:
- "18002:18002"
environment:
- NETMODTEST_GRACEFUL_TIMEOUT=8
networks:
- netmod-net
restart: unless-stopped
healthcheck:
test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/18002 || exit 1"]
interval: 5s
timeout: 3s
retries: 5
testserver:
build:
context: .
dockerfile: Dockerfile
image: networkmodule-test:latest
container_name: netmod-testserver
command: /app/bin/TestServer -p 19010 --db-host dbserver --db-port 18002 -l Info
ports:
- "19010:19010"
environment:
- NETMODTEST_GRACEFUL_TIMEOUT=8
networks:
- netmod-net
depends_on:
dbserver:
condition: service_healthy
restart: unless-stopped
testclient:
build:
context: .
dockerfile: Dockerfile
image: networkmodule-test:latest
container_name: netmod-testclient
command: /app/bin/TestClient --host testserver --port 19010 --pings 5
networks:
- netmod-net
depends_on:
- testserver
profiles:
- test
networks:
netmod-net:
driver: bridge