-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
43 lines (38 loc) · 1.34 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
# 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_DOCKER_DEFAULT_RULE: 'Host(`{{ normalize .Name }}.docker.lan`)'
TRAEFIK_ADMIN_DOMAIN: ${TRAEFIK_ADMIN_DOMAIN}
ports:
- 80:8080 # access your lb here, so http://web1.docker-image-traefik.docker.lan
- 443: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