Replace all hardcoded lazyworkhorse.net references in compose files
with ${DOMAIN} variable substitution. Create .env.production and
.env.staging environment files. Update Makefile with ENV selection
(--env-file support) and staging/production targets.
Changes:
- All 13 compose YAML files: lazyworkhorse.net -> ${DOMAIN}
- New .env.production (DOMAIN=lazyworkhorse.net)
- New .env.staging (DOMAIN=staging.lazyworkhorse.net)
- Makefile: ENV var, --env-file flag, staging/production targets
- Gitea redirect regex updated for variable substitution
- CI workflow checkout URLs left hardcoded (infrastructure refs)
- Dockerfile SSH host refs left hardcoded (infrastructure refs)
Deploy: make ENV=staging all_up or make staging
make ENV=production all_up or make production
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
authelia:
|
|
image: authelia/authelia:latest
|
|
container_name: authelia
|
|
volumes:
|
|
- /mnt/HoardingCow_docker_data/Authelia:/config
|
|
networks:
|
|
- auth_net
|
|
restart: always
|
|
labels:
|
|
- "traefik.enable=true"
|
|
|
|
# HTTP router
|
|
- "traefik.http.routers.authelia-http.rule=Host(`auth.${DOMAIN}`)"
|
|
- "traefik.http.routers.authelia-http.entrypoints=web"
|
|
- "traefik.http.routers.authelia-http.middlewares=redirect-to-https"
|
|
|
|
# HTTPS router
|
|
- "traefik.http.routers.authelia-https.rule=Host(`auth.${DOMAIN}`)"
|
|
- "traefik.http.routers.authelia-https.entrypoints=websecure"
|
|
- "traefik.http.routers.authelia-https.tls=true"
|
|
- "traefik.http.routers.authelia-https.tls.certresolver=njalla"
|
|
|
|
- "traefik.http.services.authelia.loadbalancer.server.port=9091"
|
|
|
|
# forward auth middleware definition
|
|
- "traefik.http.middlewares.authelia.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.${DOMAIN}"
|
|
- "traefik.http.middlewares.authelia.forwardauth.trustForwardHeader=true"
|
|
- "traefik.http.middlewares.authelia.forwardauth.authResponseHeaders=Remote-User,Remote-Groups,Remote-Name,Remote-Email"
|
|
|
|
networks:
|
|
auth_net:
|
|
external: true
|
|
name: auth_net
|