This repository has been archived by the owner on May 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
256 lines (238 loc) · 5.91 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
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
services:
# as-bgp:
# image: frrouting/frr:latest
# privileged: true
# network_mode: host
# volumes:
# - ./data/as-bgp:/etc/frr
### AS core network ###
as-router:
extends:
file: ./docker-compose-common.yml
service: base
image: router
volumes:
- ./data/as-router:/data
networks:
as:
ipv4_address: 120.0.16.2
as-dns:
extends:
file: ./docker-compose-common.yml
service: base
image: dns-server
volumes:
- ./data/as-dns:/data
networks:
as:
ipv4_address: 120.0.16.10
### Entreprises access network ###
entr-access:
extends:
file: ./docker-compose-common.yml
service: base
image: router
volumes:
- ./data/entr-access:/data
networks:
as:
ipv4_address: 120.0.16.3
entr-access:
ipv4_address: 120.0.24.2
### Primary entreprise network ###
entr1-router:
extends:
file: ./docker-compose-common.yml
service: base
image: router
volumes:
- ./data/entr1-router:/data
networks:
entr-access:
ipv4_address: 120.0.24.3
entr1-dmz:
ipv4_address: 120.0.28.2
entr1-intra:
ipv4_address: 120.0.29.2
### DMZ network ###
entr1-dns:
extends:
file: ./docker-compose-common.yml
service: base
image: dns-server
volumes:
- ./data/entr1-dns:/data
networks:
entr1-dmz:
ipv4_address: 120.0.28.10
irc-server:
image: ergochat/ergo:latest
entrypoint: sh -c 'ip r r default via 120.0.28.2 && exec /ircd-bin/run.sh'
privileged: true
networks:
entr1-dmz:
ipv4_address: 120.0.28.15
matrix-server:
image: matrixdotorg/synapse:latest
# to register users:
# docker compose exec matrix-server register_new_matrix_user http://localhost:8008 -c /data-host/homeserver.yaml
entrypoint:
sh -c 'apt update && apt install -y --no-install-recommends iproute2
&& ip r r default via 120.0.28.2 && /start.py generate && exec /start.py'
command: generate
environment:
- SYNAPSE_SERVER_NAME=AS1
- SYNAPSE_REPORT_STATS=no
- SYNAPSE_CONFIG_PATH=/data-host/homeserver.yaml
privileged: true
volumes:
- ./data/matrix-server:/data-host
networks:
entr1-dmz:
ipv4_address: 120.0.28.20
matrix-web:
image: vectorim/element-web:latest
entrypoint:
sh -c 'ip r r default via 120.0.28.2 && exec /docker-entrypoint.sh
nginx -g "daemon off;"'
privileged: true
volumes:
- ./data/matrix-web/config.json:/app/config.json
networks:
entr1-dmz:
ipv4_address: 120.0.28.21
# A RELIRE SVP
# LE SERVEUR DOIT ÊTRE UNE UBUNTU
# IPv4 120.0.28.28 (non-pris normalement)
# LES FICHIERS DE CONFIG DOIVENT ÊTRE MONTABLES AINSI
# QUE LE SCRIPT 'asteriskConfig.sh' dans /docker/asterisk
# srv-asterisk:
# image: asterisk
# entrypoint: sh -c 'ip r r default via 120.0.28.2 && exec asterisk -cv'
# privileged: true
# volumes:
# - ./data/asterisk:/etc/asterisk
# networks:
# entr1-dmz:
# ipv4_address: 120.0.28.28
teamspeak:
image: teamspeak:latest
entrypoint: sh -c 'ip r r default via 120.0.28.2 && exec entrypoint.sh ts3server'
environment:
TS3SERVER_DB_PLUGIN: ts3db_mariadb
TS3SERVER_DB_SQLCREATEPATH: create_mariadb
TS3SERVER_DB_HOST: db
TS3SERVER_DB_USER: root
TS3SERVER_DB_PASSWORD: example
TS3SERVER_DB_NAME: teamspeak
TS3SERVER_DB_WAITUNTILREADY: 30
TS3SERVER_LICENSE: accept
privileged: true
networks:
entr1-dmz:
ipv4_address: 120.0.28.40
db:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: teamspeak
networks:
entr1-dmz:
ipv4_address: 120.0.28.41
### Intranet network ###
entr1-ovpn:
image: kylemanna/openvpn:latest
entrypoint: sh -c 'ip r r default via 120.0.29.2 && exec ovpn_run'
environment:
- DEBUG=1
privileged: true
volumes:
- ./data/entr1-ovpn:/etc/openvpn
networks:
entr1-intra:
ipv4_address: 120.0.29.10
entr1-ovpn-monitor:
image: ruimarinho/openvpn-monitor:latest
environment:
- OPENVPNMONITOR_SITES_0_HOST=120.0.29.10
- OPENVPNMONITOR_SITES_0_NAME=entr1
- OPENVPNMONITOR_SITES_0_PORT=5555
- OPENVPNMONITOR_SITES_0_SHOWDISCONNECT=True
ports:
- "6980:80"
networks:
entr1-intra:
ipv4_address: 120.0.29.11
entr1-client:
extends:
file: ./docker-compose-common.yml
service: base
image: client
dns: 120.0.28.10
volumes:
- ./data/entr1-client:/data
networks:
entr1-intra:
ipv4_address: 120.0.29.3
### Clients access network ###
user-access:
extends:
file: ./docker-compose-common.yml
service: base
image: router
volumes:
- ./data/user-access:/data
networks:
as:
ipv4_address: 120.0.16.4
user-access:
ipv4_address: 120.0.20.2
### User 1 home network ###
user1-box:
extends:
file: ./docker-compose-common.yml
service: base
image: box
volumes:
- ./data/user1-box:/data
networks:
user-access:
ipv4_address: 120.0.20.3
user1:
ipv4_address: 192.168.0.2
user1-client:
extends:
file: ./docker-compose-common.yml
service: base
image: client
dns: 120.0.16.10
volumes:
- ./data/user1-client:/data
networks:
user1:
ipv4_address: 192.168.0.3
networks:
as:
ipam:
config:
- subnet: 120.0.16.0/22
entr-access:
ipam:
config:
- subnet: 120.0.24.0/22
entr1-dmz:
ipam:
config:
- subnet: 120.0.28.0/24
entr1-intra:
ipam:
config:
- subnet: 120.0.29.0/24
user-access:
ipam:
config:
- subnet: 120.0.20.0/22
user1:
ipam:
config:
- subnet: 192.168.0.0/24