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
42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
services:
|
|
homer:
|
|
image: b4bz/homer
|
|
container_name: homer
|
|
environment:
|
|
- UID=1000
|
|
- GID=1000
|
|
- TZ=America/Toronto
|
|
- PORT=8080
|
|
volumes:
|
|
- /mnt/HoardingCow_docker_data/Homer/assets:/www/assets:rw
|
|
restart: always
|
|
networks:
|
|
- homepage_net
|
|
labels:
|
|
- "traefik.enable=true"
|
|
|
|
# HTTP → HTTPS redirect
|
|
- "traefik.http.routers.homer-http.rule=Host(`${DOMAIN}`)"
|
|
- "traefik.http.routers.homer-http.entrypoints=web"
|
|
- "traefik.http.routers.homer-http.middlewares=redirect-to-https"
|
|
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
|
|
|
# HTTPS router protected by Authelia
|
|
- "traefik.http.routers.homer-https.rule=Host(`${DOMAIN}`)"
|
|
- "traefik.http.routers.homer-https.entrypoints=websecure"
|
|
- "traefik.http.routers.homer-https.tls=true"
|
|
- "traefik.http.routers.homer-https.tls.certresolver=njalla"
|
|
- "traefik.http.routers.homer-https.middlewares=homer-auth"
|
|
|
|
# Authelia forwardAuth
|
|
- "traefik.http.middlewares.homer-auth.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.${DOMAIN}/"
|
|
- "traefik.http.middlewares.homer-auth.forwardauth.trustforwardheader=true"
|
|
- "traefik.http.middlewares.homer-auth.forwardauth.authresponseheaders=X-Forwarded-User,X-Forwarded-Groups"
|
|
|
|
# Internal port
|
|
- "traefik.http.services.homer.loadbalancer.server.port=8080"
|
|
|
|
networks:
|
|
homepage_net:
|
|
external: true
|