Compare commits

..

2 Commits

3 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,4 @@
--- ---
version: "3"
services: services:
traefik: traefik:
image: traefik:${TRAEFIK_VERSION} image: traefik:${TRAEFIK_VERSION}
@ -13,7 +11,7 @@ services:
- --api.dashboard=true - --api.dashboard=true
# configure Let's Encrypt automatic certificates # configure Let's Encrypt automatic certificates
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.dnschallenge=true - --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.dnschallenge=true
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.dnschallenge.provider=hetzner - --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.dnschallenge.provider=${TRAEFIK_DNSPROVIDER}
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.email=${LETSENCRYPT_EMAIL} - --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.email=${LETSENCRYPT_EMAIL}
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.keytype=RSA4096 - --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.keytype=RSA4096
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.storage=/certs.json - --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.storage=/certs.json
@ -32,8 +30,8 @@ services:
# should not need, but just in case, a folder for dynamic config files is also configured # should not need, but just in case, a folder for dynamic config files is also configured
- --providers.file.directory=/config - --providers.file.directory=/config
- --providers.file.watch=true - --providers.file.watch=true
environment: env_file:
- HETZNER_API_KEY=${HETZNER_API_KEY} - ${TRAEFIK_DNSPROVIDER_ENVFILE}
labels: labels:
# expose Træfik using Træfik (dashboard) # expose Træfik using Træfik (dashboard)
- traefik.enable=${TRAEFIK_ENABLED} - traefik.enable=${TRAEFIK_ENABLED}

1
env.dnsprovider.example Normal file
View File

@ -0,0 +1 @@
HETZNER_API_KEY=

View File

@ -11,7 +11,8 @@ TRAEFIK_PILOT_TOKEN=
TRAEFIK_TLSENABLED=true TRAEFIK_TLSENABLED=true
# Certificate provider # Certificate provider
HETZNER_API_KEY= TRAEFIK_DNSPROVIDER=hetzner
TRAEFIK_DNSPROVIDER_ENVFILE=./.env.dnsprovider
LETSENCRYPT_EMAIL=admin@mydomain.com LETSENCRYPT_EMAIL=admin@mydomain.com
# Debugging # Debugging