-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-traefik.yml
60 lines (56 loc) · 1.59 KB
/
docker-compose-traefik.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
version: '3.3'
networks:
revproxy:
# SWARM only
#driver: overlay
attachable: true
services:
revproxy:
image: traefik
networks:
- revproxy
command:
- "--api"
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
- "--entrypoints=Name:https Address::443 TLS"
- "--defaultentrypoints=http,https"
- "--acme"
# Frequent restarts of the service/certificate requests will be blocked by LE servers as DoS attacks, unless the ACME storage is persistent (in a Docker volume).
- "--acme.storage=acme.json"
- "--acme.entryPoint=https"
- "--acme.httpChallenge.entryPoint=http"
- "--acme.onHostRule=true"
- "--acme.email=user@hostname.domain"
#- "--acme.acmelogging=true"
- "--acme.domains=hostname.domain"
- "--docker"
# SWARM only
#- "--docker.swarmMode"
- "--docker.domain=hostname.domain"
- "--docker.watch"
- "--logLevel=INFO"
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
ports:
- target: 80
published: 8080
mode: host
- target: 443
published: 8443
mode: host
labels:
- "traefik.backend=revproxy"
- "traefik.port=8080"
- "traefik.frontend.rule=PathPrefixStrip:/traefik/"
- "traefik.docker.network=tarzan-platform-docker_revproxy"
deploy:
mode: global
placement:
constraints: [node.role == manager]
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure