-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.traefik.yml
29 lines (29 loc) · 1.22 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
version: "2"
services:
traefik:
container_name: traefik
image: traefik:latest
ports:
- "80:80"
- "443:443"
- "8081:8081"
restart: unless-stopped
network_mode: "your-network"
environment: #AT THIS POINT IT'S ONLY FOR USE TRAEFIK WITH LET'S ENCRYPT AND OVH, IF YOU HAVE ANOTHER PROVIDER PLEASE VISIT THIS PAGE: https://docs.traefik.io/user-guide/examples/#dns-challenge
- OVH_ENDPOINT=ovh-eu
- OVH_APPLICATION_KEY=
- OVH_APPLICATION_SECRET=
- OVH_CONSUMER_KEY=
labels:
- 'traefik.enable=true'
- 'traefik.port=8081'
- 'traefik.frontend.entryPoints=http,https'
- 'traefik.frontend.rule=Host:traefik.your-dns.zone'
- 'traefik.backend=traefik'
volumes:
- /var/run/path.sock:/var/run/path.sock
- /your/path/traefik/traefik.toml:/etc/traefik/traefik.toml #TRAEFIK CONFIGURATION FILE
- /your/path/traefik/logs:/etc/traefik/logs #LOGS TRAEFIK (DEFINED IN traefik.toml)
- /your/path/traefik/acme:/etc/traefik/acme #ACME JSON GENERATED BY LET'S ENCRYPT
- /your/path/traefik/rules:/etc/traefik/rules #REVERSE PROXY RULES TO ACCESS EXTERNAL SITE
- "/etc/localtime:/etc/localtime:ro" #TO HAVE CORRECT TIME INSIDE CONTAINER