2022-08-25 22:22:11 +02:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
######## traefik ########
|
|
|
|
traefik:
|
2023-11-16 20:09:14 +01:00
|
|
|
container_name: traefik
|
2024-07-03 02:18:39 +02:00
|
|
|
image: "traefik:v3.0.4"
|
2022-08-25 22:22:11 +02:00
|
|
|
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:
|
2023-04-06 19:53:27 +02:00
|
|
|
TZ: Europe/Berlin
|
2024-02-02 13:52:33 +01:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "traefik", "healthcheck", "--ping"]
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2023-11-16 20:09:14 +01:00
|
|
|
|
|
|
|
######## nforwardauth ########
|
|
|
|
nforwardauth:
|
2023-11-21 21:20:53 +01:00
|
|
|
restart: always
|
2024-02-06 20:46:14 +01:00
|
|
|
image: "nosduco/nforwardauth:v1.4.0"
|
2023-11-16 20:09:14 +01:00
|
|
|
container_name: traefik-nforwardauth
|
|
|
|
environment:
|
2024-07-09 17:35:56 +02:00
|
|
|
TOKEN_SECRET: "{{ lookup('viczem.keepass.keepass', 'nforwardauth_token_secret', 'password') }}"
|
2023-11-16 20:09:14 +01:00
|
|
|
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
|
|
|
|
volumes:
|
|
|
|
- "./passwd:/passwd:ro" # Mount local passwd file at /passwd as read only
|
|
|
|
networks:
|
|
|
|
- traefik
|
2024-05-07 01:33:06 +02:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "wget", "--quiet", "--spider", "--tries=1", "http://127.0.0.1:3000/login"]
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2023-05-12 08:18:45 +02:00
|
|
|
|
2022-08-25 22:22:11 +02:00
|
|
|
######## Networks ########
|
|
|
|
networks:
|
|
|
|
traefik:
|
|
|
|
external: true
|
|
|
|
######## Volumes ########
|
|
|
|
volumes:
|
|
|
|
acme_data:
|
2023-11-16 20:09:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
# passwd
|
|
|
|
# echo "<user>:$(mkpasswd -m sha-512 <password>)"
|