2024-11-10 12:53:45 +01:00
|
|
|
# Details/Doku: https://wiki.mgrote.net/pages/_Technik/hardware/rest/fpv/software/rest/ldap/
|
|
|
|
|
2022-08-25 22:22:11 +02:00
|
|
|
services:
|
|
|
|
######## traefik ########
|
|
|
|
traefik:
|
2023-11-16 20:09:14 +01:00
|
|
|
container_name: traefik
|
2024-10-28 21:06:30 +01:00
|
|
|
image: "traefik:v3.2.0"
|
2024-10-23 18:21:54 +02:00
|
|
|
restart: unless-stopped
|
2024-10-23 18:20:04 +02:00
|
|
|
pull_policy: missing
|
2022-08-25 22:22:11 +02:00
|
|
|
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
|
2024-11-10 17:29:04 +01:00
|
|
|
depends_on:
|
|
|
|
- authelia
|
2023-11-16 20:09:14 +01:00
|
|
|
|
2024-11-10 12:53:45 +01:00
|
|
|
######## authelia ########
|
|
|
|
authelia:
|
|
|
|
image: authelia/authelia:4.38.17
|
|
|
|
container_name: authelia
|
2024-10-23 18:21:54 +02:00
|
|
|
restart: unless-stopped
|
2024-10-23 18:20:04 +02:00
|
|
|
pull_policy: missing
|
2023-11-16 20:09:14 +01:00
|
|
|
environment:
|
2024-11-10 12:53:45 +01:00
|
|
|
TZ: Europe/Berlin
|
|
|
|
volumes:
|
|
|
|
- ./configuration.yml:/config/configuration.yml
|
|
|
|
- ./users_database.yml:/config/users_database.yml
|
|
|
|
- authelia_data:/data
|
2023-11-16 20:09:14 +01:00
|
|
|
labels:
|
|
|
|
traefik.enable: true
|
2024-11-10 12:53:45 +01:00
|
|
|
traefik.http.routers.authelia.rule: Host(`auth.mgrote.net`)
|
|
|
|
traefik.http.services.authelia.loadbalancer.server.port: 9091
|
|
|
|
traefik.http.routers.authelia.tls: true
|
|
|
|
traefik.http.routers.authelia.tls.certresolver: resolver_letsencrypt
|
|
|
|
traefik.http.routers.authelia.entrypoints: entry_https
|
|
|
|
traefik.http.middlewares.authelia.forwardauth.address: http://authelia:9091/api/verify?rd=https://auth.mgrote.net
|
|
|
|
traefik.http.middlewares.authelia.forwardauth.trustForwardHeader: true
|
|
|
|
traefik.http.middlewares.authelia.forwardauth.authResponseHeaders: Remote-User,Remote-Groups,Remote-Name,Remote-Email
|
|
|
|
depends_on:
|
|
|
|
- authelia-redis
|
2024-11-10 17:29:04 +01:00
|
|
|
- authelia-db
|
2024-11-10 12:53:45 +01:00
|
|
|
networks:
|
|
|
|
- traefik
|
|
|
|
- postfix
|
|
|
|
- authelia
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://authelia:9091"]
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2023-11-16 20:09:14 +01:00
|
|
|
|
2024-11-10 12:53:45 +01:00
|
|
|
authelia-redis:
|
|
|
|
image: "redis:7.4.1"
|
|
|
|
container_name: authelia-redis
|
|
|
|
restart: unless-stopped
|
|
|
|
pull_policy: missing
|
|
|
|
environment:
|
|
|
|
TZ: Europe/Berlin
|
|
|
|
networks:
|
|
|
|
- authelia
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "redis-cli", "--no-auth-warning", "ping"]
|
|
|
|
interval: 5s
|
|
|
|
timeout: 2s
|
|
|
|
retries: 3
|
2023-11-16 20:09:14 +01:00
|
|
|
|
2024-11-10 12:53:45 +01:00
|
|
|
######## Datenbank ########
|
|
|
|
authelia-db:
|
|
|
|
image: "mariadb:11.5.2"
|
|
|
|
container_name: authelia-db
|
|
|
|
command: --transaction-isolation=READ-COMMITTED --log-bin=ROW --innodb_read_only_compressed=OFF
|
|
|
|
restart: unless-stopped
|
|
|
|
pull_policy: missing
|
2023-11-16 20:09:14 +01:00
|
|
|
volumes:
|
2024-11-10 12:53:45 +01:00
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
- db:/var/lib/mysql
|
|
|
|
environment:
|
2024-11-10 15:44:41 +01:00
|
|
|
MYSQL_ROOT_PASSWORD: "{{ lookup('viczem.keepass.keepass', 'authelia/authelia_mysql_root_password', 'password') }}"
|
|
|
|
MYSQL_PASSWORD: "{{ lookup('viczem.keepass.keepass', 'authelia/authelia_mysql_password', 'password') }}"
|
2024-11-10 12:53:45 +01:00
|
|
|
MYSQL_DATABASE: authelia
|
|
|
|
MYSQL_USER: authelia
|
|
|
|
MYSQL_INITDB_SKIP_TZINFO: 1
|
2023-11-16 20:09:14 +01:00
|
|
|
networks:
|
2024-11-10 12:53:45 +01:00
|
|
|
- authelia
|
2024-05-07 01:33:06 +02:00
|
|
|
healthcheck:
|
2024-11-10 15:44:41 +01:00
|
|
|
test: ["CMD", "mariadb-show", "authelia", "-h", "localhost", "-u", "authelia", "-p{{ lookup('viczem.keepass.keepass', 'authelia/authelia_mysql_password', 'password') }}"]
|
2024-11-10 12:53:45 +01:00
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
2024-05-07 01:33:06 +02:00
|
|
|
retries: 3
|
2023-05-12 08:18:45 +02:00
|
|
|
|
2024-11-10 12:53:45 +01:00
|
|
|
|
2022-08-25 22:22:11 +02:00
|
|
|
######## Networks ########
|
|
|
|
networks:
|
2024-11-10 12:53:45 +01:00
|
|
|
authelia:
|
2022-08-25 22:22:11 +02:00
|
|
|
traefik:
|
|
|
|
external: true
|
2024-11-10 12:53:45 +01:00
|
|
|
postfix:
|
|
|
|
external: true
|
2022-08-25 22:22:11 +02:00
|
|
|
######## Volumes ########
|
|
|
|
volumes:
|
|
|
|
acme_data:
|
2024-11-10 12:53:45 +01:00
|
|
|
authelia_data:
|
|
|
|
db:
|