-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
164 lines (156 loc) · 3.49 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
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
services:
vpn:
image: linuxserver/wireguard:latest
hostname: vpn
container_name: vpn
restart: unless-stopped
depends_on:
- api
environment:
- PEERS=${PEERS}
- ALLOWEDIPS=10.100.0.0/15
- SERVERURL=${SERVER_URL}
- SERVERPORT=${VPN_PORT}
- PEERDNS=${VPN_DNS}
- TICK_SECONDS=${TICK_SECONDS}
- START_TIME_PATH=${START_TIME_PATH}
cap_add:
- NET_ADMIN
volumes:
- ./.docker/vpn:/config
- ./pcaps:/pcaps
ports:
- "${VPN_PORT}:51820/udp"
networks:
game:
ipv4_address: 10.101.0.1
checker:
ipv4_address: 10.103.1.1
api:
build:
context: ./.docker/api
dockerfile: Dockerfile
hostname: api
container_name: api
restart: unless-stopped
depends_on:
- db
- ticker
environment:
- FLAG_LIFETIME=${FLAG_LIFETIME}
- API_KEY=${API_KEY}
- TEAM_COUNT=${TEAM_COUNT}
- PEERS=${PEERS}
- SERVICES=${CHECKERS}
- TEAM_TOKENS=${TEAM_TOKENS}
- START_TIME=${START_TIME}
volumes:
- ./.docker/api/src:/code
- ./.docker/vpn:/vpn
- ./.docker/api/teamdata:/teamdata
ports:
- "${API_PORT}:80"
networks:
game:
ipv4_address: 10.101.0.2
infra:
ipv4_address: 10.102.0.2
registry:
image: registry:latest
hostname: registry
container_name: registry
restart: unless-stopped
volumes:
- ./.docker/registry/cache:/cache
- ./.docker/registry/config.yml:/etc/docker/registry/config.yml
environment:
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /cache
networks:
game:
ipv4_address: 10.101.0.3
checker:
ipv4_address: 10.103.1.3
rangemaster:
build:
context: ./.docker/rangemaster
dockerfile: Dockerfile
image: alpine:latest
hostname: rangemaster
container_name: rangemaster
restart: unless-stopped
entrypoint: sleep infinity
networks:
game:
ipv4_address: 10.101.0.5
infra:
ipv4_address: 10.102.1.5
checker:
ipv4_address: 10.103.1.5
ticker:
build:
context: ./.docker/ticker
dockerfile: Dockerfile
hostname: ticker
container_name: ticker
restart: unless-stopped
environment:
- SERVICES=${SERVICES}
- CHECKERS=${CHECKERS}
- TEAM_COUNT=${TEAM_COUNT}
- TICK_SECONDS=${TICK_SECONDS}
- START_TIME=${START_TIME}
- END_TIME=${END_TIME}
volumes:
- ./.docker/ticker/src:/code
networks:
infra:
ipv4_address: 10.102.0.4
checker:
ipv4_address: 10.103.1.4
frontend:
build:
context: ./.docker/frontend
dockerfile: Dockerfile
hostname: frontend
container_name: frontend
restart: unless-stopped
environment:
- SERVER_URL=${SERVER_URL}
- API_PORT=${API_PORT}
volumes:
- ./.docker/frontend/src:/app
ports:
- "${FRONTEND_PORT}:80"
networks:
game:
ipv4_address: 10.101.0.6
infra:
ipv4_address: 10.102.0.6
db:
image: mongo:latest
hostname: db
container_name: db
restart: unless-stopped
volumes:
- db:/data/db
networks:
infra:
ipv4_address: 10.102.0.3
volumes:
db:
networks:
game:
driver: bridge
ipam:
config:
- subnet: 10.100.0.0/15
infra:
driver: bridge
ipam:
config:
- subnet: 10.102.0.0/16
checker:
driver: bridge
ipam:
config:
- subnet: 10.103.0.0/16