moved from static DNS provider to a dynamic Docker variable and env file
This commit is contained in:
parent
64e726391a
commit
4633927204
@ -11,7 +11,7 @@ services:
|
||||
- --api.dashboard=true
|
||||
# configure Let's Encrypt automatic certificates
|
||||
- --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.keytype=RSA4096
|
||||
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.storage=/certs.json
|
||||
@ -30,8 +30,8 @@ services:
|
||||
# should not need, but just in case, a folder for dynamic config files is also configured
|
||||
- --providers.file.directory=/config
|
||||
- --providers.file.watch=true
|
||||
environment:
|
||||
- HETZNER_API_KEY=${HETZNER_API_KEY}
|
||||
env_file:
|
||||
- ${TRAEFIK_DNSPROVIDER_ENVFILE}
|
||||
labels:
|
||||
# expose Træfik using Træfik (dashboard)
|
||||
- traefik.enable=${TRAEFIK_ENABLED}
|
||||
|
1
env.dnsprovider.example
Normal file
1
env.dnsprovider.example
Normal file
@ -0,0 +1 @@
|
||||
HETZNER_API_KEY=
|
@ -11,7 +11,8 @@ TRAEFIK_PILOT_TOKEN=
|
||||
TRAEFIK_TLSENABLED=true
|
||||
|
||||
# Certificate provider
|
||||
HETZNER_API_KEY=
|
||||
TRAEFIK_DNSPROVIDER=hetzner
|
||||
TRAEFIK_DNSPROVIDER_ENVFILE=./.env.dnsprovider
|
||||
LETSENCRYPT_EMAIL=admin@mydomain.com
|
||||
|
||||
# Debugging
|
||||
|
Loading…
Reference in New Issue
Block a user