-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
195 lines (186 loc) · 4.65 KB
/
docker-compose.yml
File metadata and controls
195 lines (186 loc) · 4.65 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
version: '2'
services:
db:
container_name: echoctfred_db
hostname: db
image: echothrust/echoctf.red-db
build:
context: .
dockerfile: contrib/Dockerfile-mariadb
restart: "always"
healthcheck:
test: ["CMD", "mariadb","-NBe","show databases like 'echoCTF'"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
command: ["mariadbd","--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci","--skip-character-set-client-handshake","--user=mysql"] #, "--init_file=/etc/mysql-init.sql"]
# ports:
# - 3306:3306
# - 11211:11211
volumes:
- data-mysql:/var/lib/mysql
environment:
- MARIADB_ALLOW_EMPTY_PASSWORD=root
- MARIADB_USER=vpnuser
- MARIADB_PASSWORD=vpnuserpass
- MARIADB_DATABASE=echoCTF
networks:
private:
ipv4_address: "172.24.0.253"
backend:
container_name: echoctfred_backend
hostname: backend
image: echothrust/echoctf.red-backend
build:
context: .
dockerfile: contrib/Dockerfile-backend
args:
- RED_APP=backend
- MARIADB_HOST=172.24.0.253
- MARIADB_USER=vpnuser
- MARIADB_PASSWORD=vpnuserpass
- MARIADB_DATABASE=echoCTF
restart: "always"
volumes:
- data-challenges:/var/www/echoCTF.RED/backend/web/uploads
- ./backend/web/images:/var/www/echoCTF.RED/backend/web/images
# ports:
# - 8082:80
links:
- db:db
- wsserver:wsserver
networks:
public:
ipv4_address: "172.26.0.2"
private:
ipv4_address: "172.24.0.2"
frontend:
container_name: echoctfred_frontend
hostname: frontend
image: echothrust/echoctf.red-frontend
build:
context: .
dockerfile: contrib/Dockerfile-frontend
args:
- RED_APP=frontend
- MARIADB_HOST=172.24.0.253
- MARIADB_USER=vpnuser
- MARIADB_PASSWORD=vpnuserpass
- MARIADB_DATABASE=echoCTF
restart: "always"
volumes:
- data-challenges:/var/www/echoCTF.RED/frontend/web/uploads
- ./frontend/web/images:/var/www/echoCTF.RED/frontend/web/images
links:
- db:db
- wsserver:wsserver
# ports:
# - 8080:80
networks:
private:
ipv4_address: "172.24.0.3"
public:
ipv4_address: "172.26.0.3"
wsserver:
command: ["-addr", ":8888","-db","mysql", "-dsn","vpnuser:vpnuserpass@tcp(172.24.0.253:3306)/echoCTF"]
container_name: echoctfred_wsserver
hostname: wsserver
image: echothrust/wsserver:latest
restart: "always"
depends_on:
db:
condition: service_healthy
links:
- db:db
# ports:
# - 8080:80
networks:
private:
ipv4_address: "172.24.0.4"
public:
ipv4_address: "172.26.0.4"
vpn:
container_name: echoctfred_vpn
hostname: vpn
cap_add:
- NET_ADMIN
privileged: true
image: echothrust/echoctf.red-vpn
build:
context: .
dockerfile: contrib/Dockerfile-vpn
args:
- RED_APP=backend
- MARIADB_HOST=172.24.0.253
- MARIADB_USER=vpnuser
- MARIADB_PASSWORD=vpnuserpass
- MARIADB_DATABASE=echoCTF
restart: "always"
environment:
- RED_APP=backend
- MARIADB_HOST=172.24.0.253
- MARIADB_USER=vpnuser
- MARIADB_PASSWORD=vpnuserpass
- MARIADB_DATABASE=echoCTF
volumes:
- data-openvpn:/etc/openvpn
# ports:
# - "1194:1194/udp"
links:
- db:db
- wsserver:wsserver
networks:
public:
ipv4_address: "172.26.0.1"
private:
ipv4_address: "172.24.0.1"
targets:
ipv4_address: "10.0.160.253"
# target1:
# container_name: echoctfred_target1
# restart: "always"
# image: nginx
# networks:
# targets:
# ipv4_address: "10.0.160.2"
volumes:
data-mysql:
driver: local
data-openvpn:
driver: local
data-challenges:
driver: local
networks:
public:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "false"
ipam:
driver: default
config:
- subnet: 172.26.0.0/24
gateway: 172.26.0.254
private:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "false"
ipam:
driver: default
config:
- subnet: 172.24.0.0/24
gateway: 172.24.0.254
targets:
# uncomment the following to use macvlan and comment the bridge line
# for macvlan use
# driver: macvlan
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "false"
# for macvlan also uncomment the line
# parent: ${PRIVATE_PARENT_INTERFACE}
ipam:
driver: default
config:
- subnet: 10.0.160.0/24
gateway: 10.0.160.254