-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
184 lines (172 loc) · 4.18 KB
/
docker-compose.yml
File metadata and controls
184 lines (172 loc) · 4.18 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
version: "3.3"
services:
# Hopital, soigne (redémarre) les containers unhealthy
autoheal:
image: willfarrell/autoheal
environment:
- "AUTOHEAL_CONTAINER_LABEL=all"
networks: # prevent docker from creating a default driver for this container
local:
ipv4_address: 192.168.99.99
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
# SIMULATION POSTES
simul-commercial:
image: d34d/projet-admin:employes-commercial
build: ./employes/commercial
dns: 192.168.0.2
environment:
- "DOMAIN_NAME=${DOMAIN_NAME}"
networks:
local:
ipv4_address: 192.168.2.129
volumes:
- ./certs/ca.crt:/usr/local/share/ca-certificates/ca.crt
stdin_open: true
tty: true
simul-comptable:
image: d34d/projet-admin:employes-comptable
build: ./employes/comptable
dns: 192.168.0.2
environment:
- "DOMAIN_NAME=${DOMAIN_NAME}"
networks:
local:
ipv4_address: 192.168.2.65
volumes:
- ./certs/ca.crt:/usr/local/share/ca-certificates/ca.crt
stdin_open: true
tty: true
simul-direction:
image: d34d/projet-admin:employes-direction
build: ./employes/direction
dns: 192.168.0.2
environment:
- "DOMAIN_NAME=${DOMAIN_NAME}"
networks:
local:
ipv4_address: 192.168.2.1
volumes:
- ./certs/ca.crt:/usr/local/share/ca-certificates/ca.crt
stdin_open: true
tty: true
simul-ouvrier:
image: d34d/projet-admin:employes-ouvrier
build: ./employes/ouvrier
dns: 192.168.0.2
environment:
- "DOMAIN_NAME=${DOMAIN_NAME}"
networks:
local:
ipv4_address: 192.168.2.97
volumes:
- ./certs/ca.crt:/usr/local/share/ca-certificates/ca.crt
stdin_open: true
tty: true
simul-secretaire:
image: d34d/projet-admin:employes-secretaire
build: ./employes/secretaire
dns: 192.168.0.2
environment:
- "DOMAIN_NAME=${DOMAIN_NAME}"
networks:
local:
ipv4_address: 192.168.2.33
volumes:
- ./certs/ca.crt:/usr/local/share/ca-certificates/ca.crt
stdin_open: true
tty: true
# WEB
web-reverseproxy:
image: d34d/projet-admin:web-reverseproxy
build: ./web/reverseproxy
networks:
local:
ipv4_address: 192.168.0.5
volumes:
- "web-caddy-data:/data"
ports:
- "80:80"
- "443:443"
deploy:
placement:
constraints: [node.role == manager]
environment:
- "DOMAIN_NAME=${DOMAIN_NAME}"
web-server:
image: d34d/projet-admin:web-server
build: ./web/webserver
networks:
local:
aliases:
- "web-b2b"
- "web-vitrine"
- "web-interne"
ipv4_address: 192.168.0.3
environment:
- "DOMAIN_NAME=${DOMAIN_NAME}"
volumes:
- "web-server-crt:/etc/apache2/certificate"
deploy:
placement:
constraints: [node.role == manager]
web-db:
image: d34d/projet-admin:web-db
build: ./web/db
networks:
local:
ipv4_address: 192.168.1.2
volumes:
- "web-db-data:/var/lib/mysql"
- "web-db-crt:/etc/mysql/ssl"
environment:
- "MYSQL_ROOT_PASSWORD=${DB_PASS}"
deploy:
placement:
constraints: [node.role == manager] # Pour que la db se lance tjrs au même endroit, avec le même volume
# VPN
vpn-server:
image: d34d/projet-admin:vpn-server
build: ./vpn
networks:
local:
ipv4_address: 192.168.0.4
ports:
- "1194:1194/udp"
volumes:
- "vpn-crt:/etc/openvpn/certs"
sysctls:
- "net.ipv6.conf.all.disable_ipv6=0"
environment:
- "DOMAIN_NAME=${DOMAIN_NAME}"
- "IPV6_64=${IPV6_64}"
cap_add:
- NET_ADMIN
deploy:
placement:
constraints: [node.role == manager]
# DNS
dns:
image: d34d/projet-admin:dns
build: ./dns
networks:
local:
ipv4_address: 192.168.0.2
ports:
- "53:53/udp"
- "53:53/tcp"
environment:
- "DOMAIN_NAME=${DOMAIN_NAME}"
- "PUBLIC_IP=${PUBLIC_IP}"
networks:
local:
ipam:
driver: default
config:
- subnet: 192.168.0.0/16
volumes:
web-db-data:
web-db-crt:
web-caddy-data:
web-server-crt:
vpn-crt: