-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yml
162 lines (154 loc) · 3.73 KB
/
docker-compose.yml
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
version: '2'
services:
db:
container_name: echoctfred_db
hostname: db
image: echothrust/echoctf.red-db
build:
context: .
dockerfile: contrib/Dockerfile-mariadb
restart: "always"
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
- MYSQL_HOST=172.24.0.253
- MYSQL_USER=vpnuser
- MYSQL_PASSWORD=vpnuserpass
- MYSQL_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
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
- MYSQL_HOST=172.24.0.253
- MYSQL_USER=vpnuser
- MYSQL_PASSWORD=vpnuserpass
- MYSQL_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
# ports:
# - 8080:80
networks:
private:
ipv4_address: "172.24.0.3"
public:
ipv4_address: "172.26.0.3"
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
- MYSQL_HOST=172.24.0.253
- MYSQL_USER=vpnuser
- MYSQL_PASSWORD=vpnuserpass
- MYSQL_DATABASE=echoCTF
restart: "always"
environment:
- RED_APP=backend
- MYSQL_HOST=172.24.0.253
- MYSQL_USER=vpnuser
- MYSQL_PASSWORD=vpnuserpass
- MYSQL_DATABASE=echoCTF
volumes:
- data-openvpn:/etc/openvpn
# ports:
# - "1194:1194/udp"
links:
- db:db
networks:
public:
ipv4_address: "172.26.0.1"
private:
ipv4_address: "172.24.0.1"
targets:
ipv4_address: "10.0.160.1"
# 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:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "false"
ipam:
driver: default
config:
- subnet: 10.0.160.0/24
gateway: 10.0.160.254