-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
45 lines (45 loc) · 1.47 KB
/
compose.yml
File metadata and controls
45 lines (45 loc) · 1.47 KB
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
# Needed environment variables:
# - CF_API_EMAIL: Your Cloudflare account email.
# - CF_DNS_API_TOKEN: Your Cloudflare API token.
services:
traefik:
container_name: traefik
image: traefik:v3.6
restart: unless-stopped
command:
- --accesslog=true
- --api.dashboard=true
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=proxy
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.web.http.redirections.entrypoint.permanent=true
- --certificatesresolvers.cloudflare.acme.dnschallenge=true
- --certificatesresolvers.cloudflare.acme.dnschallenge.provider=cloudflare
- "--certificatesresolvers.cloudflare.acme.email=${CF_API_EMAIL}"
- --certificatesresolvers.cloudflare.acme.storage=/letsencrypt/acme.json
- --log.level=DEBUG
environment:
- CF_API_EMAIL=${CF_API_EMAIL}
- CF_DNS_API_TOKEN=${CF_DNS_API_TOKEN}
networks:
- proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- traefik-appdata:/letsencrypt
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
proxy:
driver: bridge
name: proxy
volumes:
traefik-appdata: