-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (80 loc) · 2.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
85 lines (80 loc) · 2.12 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
73
74
75
76
77
78
79
80
81
82
83
84
85
# 네트워크 보안 게임 - Docker Compose 설정
# 서버 + 웹 기반 클라이언트 컨테이너
version: '3.8'
services:
# 게임 서버 (웹 GUI)
server:
build: .
container_name: game_server
hostname: server
networks:
game_network:
ipv4_address: 172.20.0.10
ports:
- "19999:9999"
- "8000:8000"
command: python -m server.web_server_gui --game-host 0.0.0.0 --game-port 9999 --web-host 0.0.0.0 --web-port 8000
stdin_open: true
tty: true
volumes:
- ./:/app
# 플레이어 1 (웹 클라이언트)
player1:
build: .
container_name: game_player1
hostname: player1
networks:
game_network:
ipv4_address: 172.20.0.11
ports:
- "8081:5000"
- "10041:10001" # P2P 공격 수신 포트
environment:
- PYTHONUNBUFFERED=1
command: python -u -m client.web_client --host 0.0.0.0 --port 5000 --player-id Player1 --server-host 172.20.0.10 --server-port 9999
depends_on:
- server
volumes:
- ./:/app
# 플레이어 2 (웹 클라이언트)
player2:
build: .
container_name: game_player2
hostname: player2
networks:
game_network:
ipv4_address: 172.20.0.12
ports:
- "8082:5000"
- "10042:10002" # P2P 공격 수신 포트
environment:
- PYTHONUNBUFFERED=1
command: python -u -m client.web_client --host 0.0.0.0 --port 5000 --player-id Player2 --server-host 172.20.0.10 --server-port 9999
depends_on:
- server
volumes:
- ./:/app
# 플레이어 3 (웹 클라이언트)
player3:
build: .
container_name: game_player3
hostname: player3
networks:
game_network:
ipv4_address: 172.20.0.13
ports:
- "8083:5000"
- "10043:10003" # P2P 공격 수신 포트
environment:
- PYTHONUNBUFFERED=1
command: python -u -m client.web_client --host 0.0.0.0 --port 5000 --player-id Player3 --server-host 172.20.0.10 --server-port 9999
depends_on:
- server
volumes:
- ./:/app
networks:
game_network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16