refactor: use $DOMAIN env var instead of hardcoded lazyworkhorse.net #39

Open
Hermes wants to merge 1 commits from env-vars-for-domain into master
Collaborator

Summary

Replace all hardcoded lazyworkhorse.net URLs in docker-compose YAML files with ${DOMAIN} variable substitution. Create .env.production and .env.staging environment files. Update Makefile with environment selection support.

Changes

Compose files (13 files)

Every reference to lazyworkhorse.net in compose YAML values is now ${DOMAIN}:

  • Traefik Host rules: Host(`subdomain.${DOMAIN}`)
  • Environment variables: GITEA__server__ROOT_URL=https://code.${DOMAIN}
  • Forward auth redirects: https://auth.${DOMAIN}/
  • WireGuard host: WG_HOST=vpn.${DOMAIN}
  • Vaultwarden domain: DOMAIN=https://pass.${DOMAIN} (docker compose expands RHS before passing to container)

New files

  • .env.productionDOMAIN=lazyworkhorse.net
  • .env.stagingDOMAIN=staging.lazyworkhorse.net

Makefile

  • Added ENV variable (default: production) with ENV_FILE=.env.$(ENV)
  • All docker compose and docker stack commands now pass --env-file $(ENV_FILE)
  • New staging and production convenience targets
  • New env target to show current settings
  • COMPOSE_PATH changed to ?= for override support

Not changed

  • Gitea CI workflow checkout URLs (infrastructure — point to the real Gitea server)
  • Dockerfile SSH host keys (infrastructure — actual server hostname)

Usage

# Production (default)
make production
make all_up
make openwebui_up

# Staging
make staging
make openwebui_up ENV=staging
# or: make openwebui_up ENV=staging

# Direct
docker compose --env-file .env.staging -f ai/compose.yml up -d
## Summary Replace all hardcoded `lazyworkhorse.net` URLs in docker-compose YAML files with `${DOMAIN}` variable substitution. Create `.env.production` and `.env.staging` environment files. Update Makefile with environment selection support. ## Changes ### Compose files (13 files) Every reference to `lazyworkhorse.net` in compose YAML values is now `${DOMAIN}`: - Traefik Host rules: ``Host(`subdomain.${DOMAIN}`)`` - Environment variables: `GITEA__server__ROOT_URL=https://code.${DOMAIN}` - Forward auth redirects: `https://auth.${DOMAIN}/` - WireGuard host: `WG_HOST=vpn.${DOMAIN}` - Vaultwarden domain: `DOMAIN=https://pass.${DOMAIN}` (docker compose expands RHS before passing to container) ### New files - `.env.production` — `DOMAIN=lazyworkhorse.net` - `.env.staging` — `DOMAIN=staging.lazyworkhorse.net` ### Makefile - Added `ENV` variable (default: production) with `ENV_FILE=.env.$(ENV)` - All `docker compose` and `docker stack` commands now pass `--env-file $(ENV_FILE)` - New `staging` and `production` convenience targets - New `env` target to show current settings - `COMPOSE_PATH` changed to `?=` for override support ### Not changed - Gitea CI workflow checkout URLs (infrastructure — point to the real Gitea server) - Dockerfile SSH host keys (infrastructure — actual server hostname) ## Usage ```bash # Production (default) make production make all_up make openwebui_up # Staging make staging make openwebui_up ENV=staging # or: make openwebui_up ENV=staging # Direct docker compose --env-file .env.staging -f ai/compose.yml up -d ```
Hermes added 1 commit 2026-05-20 18:20:58 +00:00
refactor: use $DOMAIN env var instead of hardcoded lazyworkhorse.net
Some checks failed
Build Hermes agent / build (pull_request) Has been cancelled
Build ollama (gfx906) / build (pull_request) Has been cancelled
5a4963c2bd
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
Some checks failed
Build Hermes agent / build (pull_request) Has been cancelled
Build ollama (gfx906) / build (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • ai/compose.yml
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin env-vars-for-domain:env-vars-for-domain
git checkout env-vars-for-domain
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gortium/compose#39
No description provided.