This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (45 loc) · 1.76 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
version: '3'
services:
traefik:
image: "traefik:v2.3"
container_name: "traefik"
command:
# TRAEFIK CONFIG
- "--log.level=ERROR"
- "--log.filepath=/traefik.log"
- "--api.insecure=true"
# PROVIDERS
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
# ENTRYPOINTS
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
# SSL
- "--certificatesresolvers.traefikResolver.acme.email=t.bellanger34@gmail.com"
- "--certificatesresolvers.traefikResolver.acme.storage=acme.json"
- "--certificatesresolvers.traefikResolver.acme.tlschallenge=true"
- "--certificatesresolvers.traefikResolver.acme.httpchallenge=true"
- "--certificatesresolvers.traefikResolver.acme.httpchallenge.entrypoint=web"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/cert/acme.json:/acme.json"
- "./.log/traefik.log:/traefik.log"
doc:
build: .
restart: unless-stopped
environment:
SITE: ${SITE}
WEBSITE_NAME: ${WEBSITE_NAME}
TEMPLATE: ${TEMPLATE}
labels:
- "traefik.enable=true"
- "traefik.http.services.doc.loadbalancer.server.port=3001"
- "traefik.http.routers.doc-router.rule=Host(`${HOSTNAME}`) && PathPrefix(`/docs`)"
- "traefik.http.routers.doc-router.entrypoints=websecure"
- "traefik.http.routers.doc-router.tls=true"
- "traefik.http.routers.doc-router.tls.certresolver=traefikResolver"