/
docker-compose.yml
39 lines (36 loc) · 1.4 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
version: '3.4'
# articles used to construct this compose:
# * [Secure Traefik dashboard with https and password in docker](https://medium.com/@xavier.priour/secure-traefik-dashboard-with-https-and-password-in-docker-5b657e2aa15f)
# * [Traefik entrypoint configuration](https://docs.traefik.io/configuration/entrypoints/#all-available-options)
services:
proxy:
image: traefik
command:
- "--api"
- "--defaultEntryPoints=http,https"
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
# clear text pwd: Pn7-x6C@4xvP9,g
- "--entrypoints=Name:traefik Address::8080 Auth.Basic.Users:docker:$$apr1$$Cv2tp6SH$$hoSgKoXezpBUTSm6A8REP0"
- "--entrypoints=Name:https Address::443 TLS TLS.DefaultCertificate.Cert:/certs/docker.localhost.crt TLS.DefaultCertificate.Key:/certs/docker.localhost.key"
- "--keepTrailingSlash=true"
- "--ping"
- "--ping.entrypoint=http"
- "--docker"
- "--docker.exposedByDefault=false"
- "--docker.domain=docker.localhost"
ports:
- "81:80"
- "443:443"
labels:
traefik.enable: 'true'
traefik.docker.network: traefik_webgateway
traefik.frontend.rule: 'Host:traefik.docker.localhost'
# traefik dashboard port
traefik.port: 8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./certs:/certs
networks:
- webgateway
networks:
webgateway: