-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
36 lines (34 loc) · 1.31 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
version: '3'
services:
traefik:
image: traefik:v2.11
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- traefik-proxy
ports:
- "80:80"
- "443:443"
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./data/traefik.yml:/etc/traefik/traefik.yml:ro"
- "./data/config.yml:/etc/traefik/config.yml:ro"
- "./data/certs:/etc/certs:ro"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=http,https"
- "traefik.http.routers.traefik.rule=Host(`traefik.scriptcie.nl.localhost`)"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.tls.certresolver=le"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.middlewares=auth"
# Note: when used in docker-compose.yml all dollar signs in the hash need to be doubled for escaping.
# To create a user:password pair, the following command can be used:
# echo $(htpasswd -nb user password) | sed -e s/\\$/\\$\\$/g
- "traefik.http.middlewares.auth.basicauth.users=scriptcie:$$2y$$05$$/QhVUzaG5Tvo1/TBou2kEOzVmEOkIAmivzSOrqaaxIw7LDXP3kp7S"
networks:
traefik-proxy:
external: true