-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-traefik.yml
executable file
·68 lines (65 loc) · 2.31 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
61
62
63
64
65
66
67
68
version: "3"
services:
traefik:
image: "traefik:v2.1"
networks:
- traefik_reverseproxy_net
container_name: "traefik"
command:
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.address=:443"
- "--entryPoints.backend.address=:521"
- "--providers.docker=true"
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--certificatesResolvers.letsencrypt.acme.email=your@email.com"
- "--certificatesResolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
- "--certificatesResolvers.letsencrypt.acme.tlsChallenge=true"
- "--certificatesResolvers.letsencrypt.acme.keyType=RSA4096"
ports:
- "8082:80"
- "4433:443"
- "521:521"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/traefik/letsencrypt:/letsencrypt"
phpmyadmin:
image: phpmyadmin/phpmyadmin:5
networks:
- traefik_reverseproxy_net
environment:
PMA_HOST: db-pma.traefik.local
PMA_ABSOLUTE_URI: https://pma.traefik.local:521/
logging:
driver: json-file
labels:
traefik.http.routers.phpmyadminssl.tls: "true"
traefik.http.routers.phpmyadminssl.rule: Host(`pma.traefik.local`)
traefik.http.routers.phpmyadminssl.tls.certresolver: letsencrypt
#traefik.http.routers.phpmyadminssl.tls.options: secure-tls@file
#traefik.http.routers.phpmyadminssl.entrypoints: backend
phpmyadmin.service.deployment.autoredeploy: "true"
traefik.http.services.phpmyadminlb.loadbalancer.passhostheader: "true"
traefik.docker.network: traefik_reverseproxy_net
traefik.enable: "true"
traefik.http.services.phpmyadminlb.loadbalancer.server.scheme: http
traefik.http.services.phpmyadminlb.loadBalancer.server.port: "80"
mysql5717:
image: mysql:5.7.17
container_name: db-pma.traefik.local
dns_search: db-pma.traefik.local
hostname: db-pma.traefik.local
domainname: db-pma.traefik.local
restart: on-failure:2
networks:
- traefik_reverseproxy_net
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=public
- MYSQL_USER=public
- MYSQL_PASSWORD=public
networks:
traefik_reverseproxy_net:
driver: bridge