Compare commits
No commits in common. "4d4a578b78c76e6bec757087be1e2e0f21b83cf8" and "4f46fdcdea56919840df940d379494568a27c7fd" have entirely different histories.
4d4a578b78
...
4f46fdcdea
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
/.env
|
.env
|
||||||
/certs.json
|
le-certs.json
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
---
|
|
||||||
version: "3"
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
@ -12,11 +11,11 @@ services:
|
|||||||
# enable Træfik dashboard
|
# enable Træfik dashboard
|
||||||
- --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.letsencrypt.acme.dnschallenge=true
|
||||||
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.dnschallenge.provider=hetzner
|
- --certificatesresolvers.letsencrypt.acme.dnschallenge.provider=hetzner
|
||||||
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.email=${LETSENCRYPT_EMAIL}
|
- --certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}
|
||||||
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.keytype=RSA4096
|
- --certificatesresolvers.letsencrypt.acme.keytype=RSA4096
|
||||||
- --certificatesresolvers.${TRAEFIK_CERTRESOLVER}.acme.storage=/certs.json
|
- --certificatesresolvers.letsencrypt.acme.storage=/le-certs.json
|
||||||
# we listen on both HTTP and HTTPS
|
# we listen on both HTTP and HTTPS
|
||||||
- --entrypoints.http.address=:80
|
- --entrypoints.http.address=:80
|
||||||
- --entrypoints.https.address=:443
|
- --entrypoints.https.address=:443
|
||||||
@ -36,7 +35,7 @@ services:
|
|||||||
- HETZNER_API_KEY=${HETZNER_API_KEY}
|
- HETZNER_API_KEY=${HETZNER_API_KEY}
|
||||||
labels:
|
labels:
|
||||||
# expose Træfik using Træfik (dashboard)
|
# expose Træfik using Træfik (dashboard)
|
||||||
- traefik.enable=${TRAEFIK_ENABLED}
|
- traefik.enable=true
|
||||||
# configure a global whitelist for my home
|
# configure a global whitelist for my home
|
||||||
- traefik.http.middlewares.dashboard-whitelist.ipwhitelist.sourcerange=${TRAEFIK_DASHBOARD_WHITELIST}
|
- traefik.http.middlewares.dashboard-whitelist.ipwhitelist.sourcerange=${TRAEFIK_DASHBOARD_WHITELIST}
|
||||||
# configure the global redirect middleware
|
# configure the global redirect middleware
|
||||||
@ -58,8 +57,8 @@ services:
|
|||||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`)
|
||||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.service=api@internal
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.service=api@internal
|
||||||
# of course, enable TLS and it's certificate provider
|
# of course, enable TLS and it's certificate provider
|
||||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED}
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=true
|
||||||
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER}
|
- traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=letsencrypt
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
ports:
|
ports:
|
||||||
@ -68,7 +67,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
- ./config:/config:ro
|
- ./config:/config:ro
|
||||||
- ./certs.json:/certs.json
|
- ./le-certs.json:/le-certs.json
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
traefik:
|
traefik:
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
# General environment
|
|
||||||
TRAEFIK_VERSION=2.4
|
TRAEFIK_VERSION=2.4
|
||||||
TRAEFIK_CERTRESOLVER=letsencrypt
|
|
||||||
TRAEFIK_CONTAINER_NAME=traefik.mydomain.com
|
TRAEFIK_CONTAINER_NAME=traefik.mydomain.com
|
||||||
TRAEFIK_DASHBOARD_WHITELIST=1.2.3.4/24
|
|
||||||
TRAEFIK_ENABLED=true
|
|
||||||
TRAEFIK_NETWORK=traefik
|
|
||||||
TRAEFIK_MATCHRULE=traefik.mydomain.com
|
TRAEFIK_MATCHRULE=traefik.mydomain.com
|
||||||
TRAEFIK_ROUTER=traefik_mydomain_com
|
TRAEFIK_ROUTER=traefik_mydomain_com
|
||||||
|
TRAEFIK_NETWORK=traefik-proxy
|
||||||
TRAEFIK_PILOT_TOKEN=
|
TRAEFIK_PILOT_TOKEN=
|
||||||
TRAEFIK_TLSENABLED=true
|
TRAEFIK_DASHBOARD_WHITELIST=1.2.3.4/24
|
||||||
|
|
||||||
# Certificate provider
|
# Certificate provider
|
||||||
HETZNER_API_KEY=
|
HETZNER_API_KEY=
|
||||||
|
Loading…
Reference in New Issue
Block a user