Enable Cloudflare in Traefik

This commit is contained in:
Jean Froment 2019-09-30 23:37:17 +02:00
parent 266df28db8
commit 9564a70313
4 changed files with 12 additions and 3 deletions

View File

@ -6,6 +6,9 @@ PORTAINER_ADMIN_PASSWORD=h4ckMePleAse
PGID=1000
PUID=1000
CLOUDFLARE_EMAIL=your@email.com
CLOUDFLARE_API_KEY=your_cloudflare_api_key
# Nextcloud
NEXTCLOUD_ADMIN_USER=admin
NEXTCLOUD_ADMIN_PASSWORD=nextcloud_admin_password

View File

@ -12,6 +12,9 @@ services:
- "80:80"
- "443:443"
#- "8080:8080"
environment:
- CF_API_EMAIL=${CLOUDFLARE_EMAIL}
- CF_API_KEY=${CLOUDFLARE_API_KEY}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml

View File

@ -24,8 +24,11 @@ storage = "acme.json"
entryPoint = "https"
onHostRule = true
acmeLogging = true
[acme.httpChallenge]
entryPoint = "http"
[acme.dnsChallenge]
dnsProvider = "cloudflare"
delayBeforeCheck = 300
#[acme.httpChallenge]
#entryPoint = "http"
################################################################
# Web configuration backend

View File

@ -11,7 +11,7 @@ hostname="example.com"
username="bob"
# Plex container name for WebTools IP fetching
container="seedbox_plex_1"
container="plex"
# Port for WebTools on the container
port=33442