Michael Grote
e8d7c61ff2
Reviewed-on: #607 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
61 lines
1.7 KiB
Django/Jinja
61 lines
1.7 KiB
Django/Jinja
version: '3'
|
|
services:
|
|
######## traefik ########
|
|
traefik:
|
|
container_name: traefik
|
|
image: traefik:latest
|
|
restart: always
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./traefik.yml:/etc/traefik/traefik.yml
|
|
- ./file-provider.yml:/etc/traefik/file-provider.yml
|
|
- acme_data:/etc/traefik/acme
|
|
networks:
|
|
- traefik
|
|
ports:
|
|
- "80:80" # HTTP
|
|
- "8081:8080" # Web-GUI
|
|
- "443:443" # HTTPS
|
|
- "2222:2222" # SSH
|
|
environment:
|
|
TZ: Europe/Berlin
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: true
|
|
|
|
######## nforwardauth ########
|
|
nforwardauth:
|
|
restart: always
|
|
image: nosduco/nforwardauth:v1
|
|
container_name: traefik-nforwardauth
|
|
environment:
|
|
TOKEN_SECRET: {{ lookup('keepass', 'nforwardauth_token_secret', 'password') }}
|
|
AUTH_HOST: auth.mgrote.net
|
|
labels:
|
|
traefik.enable: true
|
|
traefik.http.routers.nforwardauth.rule: Host(`auth.mgrote.net`)
|
|
|
|
traefik.http.middlewares.nforwardauth.forwardauth.address: http://nforwardauth:3000
|
|
|
|
traefik.http.services.nforwardauth.loadbalancer.server.port: 3000
|
|
traefik.http.routers.nforwardauth.tls: true
|
|
traefik.http.routers.nforwardauth.tls.certresolver: resolver_letsencrypt
|
|
traefik.http.routers.nforwardauth.entrypoints: entry_https
|
|
|
|
com.centurylinklabs.watchtower.depends-on: traefik
|
|
com.centurylinklabs.watchtower.enable: true
|
|
volumes:
|
|
- "./passwd:/passwd:ro" # Mount local passwd file at /passwd as read only
|
|
networks:
|
|
- traefik
|
|
|
|
######## Networks ########
|
|
networks:
|
|
traefik:
|
|
external: true
|
|
######## Volumes ########
|
|
volumes:
|
|
acme_data:
|
|
|
|
|
|
# passwd
|
|
# echo "<user>:$(mkpasswd -m sha-512 <password>)"
|