-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (60 loc) · 1.53 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
version: 3.9
networks:
# Réseau interne
t2_proxy:
name: t2_proxy
driver: bridge
ipam:
config:
- subnet: 192.168.90.0/24
# Réseau disponible par internet
default:
driver: bridge
# Réseau pour les containers demandant des
# accès spéciaux (Traefik)
socket_proxy:
name: socket_proxy
driver: bridge
ipam:
config:
- subnet: 192.168.91.0/24
x-common-keys-core: &common-keys-core
networks:
- t2_proxy
security_opt:
- no-new-privileges:true
restart: always
services:
traefik:
<<: *common-keys-core
container_name: traefik
image: traefik:2.10.1
networks:
t2_proxy:
ipv4_address: 192.168.90.254
socket_proxy:
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
volumes:
- $DOCKERDIR/appdata/traefik2/rules/cloudserver:/rules
# cert location - you must create this emtpy file and change permissions to 600
- $DOCKERDIR/appdata/traefik2/acme/acme.json:/acme.json
environment:
- TZ=$TZ
- CF_API_EMAIL_FILE=/run/secrets/cf_email
- CF_API_KEY_FILE=/run/secrets/cf_api_key
# HTPASSWD_FILE can be whatever as it is not used/called anywhere.
- HTPASSWD_FILE=/run/secrets/htpasswd
# Passing the domain name to traefik container to be able to use the variable in rules.
- DOMAINNAME_CLOUD_SERVER
secrets:
- cf_email
- cf_api_key
- htpasswd