-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose-resolvers.yml
51 lines (46 loc) · 1.73 KB
/
docker-compose-resolvers.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
# that is just a test-setup for development of the image and different tests - change it for your needs
version: '3'
services:
traefik:
image: ghcr.io/eugenmayer/traefik:2.x
environment:
TRAEFIK_DOCKER_ENABLE: 'true'
TRAEFIK_ADMIN_ENABLE: 'true'
TRAEFIK_ADMIN_SSL: 'true'
TRAEFIK_LOG_LEVEL: 'info'
TRAEFIK_ACME_CHALLENGE: 'dns'
TRAEFIK_HTTPS_ENABLE: 'only'
# see README.md
TRAEFIK_ACME_ENABLE: 'true'
TRAEFIK_ACME_CHALLENGE_DNS_PROVIDER: 'cloudflare'
TRAEFIK_ACME_CHALLENGE_DNS_CREDENTIALS: 'CF_DNS_API_TOKEN=<token>'
TRAEFIK_DOCKER_DEFAULT_RULE: 'Host(`{{ normalize .Name }}.docker.lan`)'
TRAEFIK_ADMIN_DOMAIN: ${TRAEFIK_ADMIN_DOMAIN}
TRAEFIK_ACME_DNS_RESOLVERS: '1.1.1.1:53,8.8.8.8:53'
TRAEFIK_ACME_CASERVER: 'https://acme-staging-v02.api.letsencrypt.org/directory'
ports:
- 10080:8080 # access your lb here, so http://web1.docker-image-traefik.docker.lan
- 10443:8443 # admin backend under https://localhost/dashboard
volumes:
- certs:/mnt/certs
- filestorage:/mnt/filestorage
- acme:/mnt/acme
# mount our docker socket so our docker container can be discovered
- /var/run/docker.sock:/var/run/docker.sock
labels:
traefik.enable: false
web1: # upstream/frontend 1: http://web1-docker-image-traefik.docker.lan/
image: eugenmayer/whoami:single
web2: # upstream/frontend 2: http://web1-docker-image-traefik.docker.lan/
image: eugenmayer/whoami:single
web3: # upstream/frontend 3: http://foo.bar.lan
image: eugenmayer/whoami:single
labels:
traefik.http.routers.web3.rule: 'Host(`foo.bar.lan`)'
volumes:
acme:
driver: local
certs:
driver: local
filestorage:
driver: local