version: "3" services: traefik: container_name: traefik image: traefik:latest depends_on: - authelia restart: unless-stopped networks: - web ports: - 80:80 - 443:443 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - ./traefik.toml:/traefik.toml - ./traefik_dynamic.toml:/traefik_dynamic.toml - ./acme.json:/acme.json - ./.htpasswd:/.htpasswd authelia: image: authelia/authelia container_name: authelia volumes: - ./authelia:/config networks: - web labels: - 'traefik.http.routers.authelia.rule=Host(`auth.jafner.net`)' - 'traefik.http.routers.authelia.entrypoints=websecure' - 'traefik.http.routers.authelia.tls=true' - 'traefik.http.middlewares.authelia.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.jafner.net/' - 'traefik.http.middlewares.authelia.forwardauth.trustForwardHeader=true' - 'traefik.http.middlewares.authelia.forwardauth.authResponseHeaders=Remote-User, Remote-Groups, Remote-Name, Remote-Email' - 'traefik.http.middlewares.authelia-basic.forwardauth.address=http://authelia:9091/api/verify?auth=basic' - 'traefik.http.middlewares.authelia-basic.forwardauth.trustForwardHeader=true' - 'traefik.http.middlewares.authelia-basic.forwardauth.authResponseHeaders=Remote-User, Remote-Groups, Remote-Name, Remote-Email' redis: image: redis:alpine container_name: redis volumes: - ./redis:/data networks: - web expose: - 6379 networks: web: external: true