-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (51 loc) · 2.15 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
44
45
46
47
48
49
50
51
52
53
54
services:
reverse-proxy:
image: traefik:v3.2
restart: unless-stopped
container_name: traefik
command:
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--providers.docker=true"
- "--log.level=INFO"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=reg.doroshenko@gmail.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/try-canada/letsencrypt:/letsencrypt
- /etc/ssl/private/try-canada-ssl.key:/certs/try-canada-ssl.key
- /etc/ssl/certs/try-canada-ssl.cer:/certs/try-canada-ssl.cer
- ~/reverse-proxy:/config
- /var/log/traefik/:/var/log/traefik/
- /var/lib/try-canada/static/:/static/try-canada/
# labels:
# - "traefik.http.routers.dashboard.rule=Host(`dashboard.try-canada.org`)"
# - "traefik.http.routers.dashboard.entrypoints=websecure"
# - "traefik.http.routers.dashboard.service=api@internal"
# - "traefik.http.routers.dashboard.tls=true"
networks:
- traefik-net
nginx:
image: nginx:latest
restart: unless-stopped
volumes:
- "~/reverse-proxy/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro"
- "/usr/share/nginx/html/static/try-canada/:/usr/share/nginx/html/static/try-canada/"
# - "/var/lib/try-canada/media/:/usr/share/nginx/html/media/try-canada/"
labels:
- "traefik.http.services.try-canada-static.loadbalancer.server.port=80"
- "traefik.http.routers.try-canada-static.rule=Host(`www.try-canada.org`) && PathPrefix(`/static`)"
- "traefik.http.routers.try-canada-static.entrypoints=websecure"
- "traefik.http.routers.try-canada-static.tls.certresolver=myresolver"
- "traefik.enable=true"
# - "traefik.http.routers.media-try-canada.rule=Host(`www.try-canada.org`) && PathPrefix(`/media`)"
# - "traefik.http.services.media-try-canada.loadbalancer.server.port=80"
networks:
- traefik-net
networks:
traefik-net:
name: traefik-net