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
pull from: env-vars-for-domain
merge into: gortium:master
gortium:master
gortium:feat/worldmonitor
gortium:feat/honcho-only
gortium:merge/drop-fork-use-plugins-into-master
gortium:feat/drop-multi-memory
gortium:feat/drop-fork-use-plugins
gortium:feat/honcho-only-rebased
gortium:fix/multi-gateway-path
gortium:fix/hermes-build
gortium:fix/remove-venv-mount
gortium:feat/multi-profile-gateways
gortium:feat/memory-providers
gortium:fix/matrix-bridge-dependencies
gortium:workspace-recovery-may21
gortium:merge/network-creation-fix
gortium:fix/matrix-bridge-deps
gortium:merge-all-prs-7-to-11
gortium:feat/ai-chromium-packages
gortium:fix/combined-network-bridge
gortium:feat/env-example-paperclip
gortium:feat/dockerfile-pr1-curl-poppler-imagemagick
gortium:feat/ai-base-image-temp
gortium:feat/7zz-chm-extraction-v3
gortium:feat/texlive-latex-v2
gortium:feat/hermes-chromium-packages
gortium:feat/qemu-cross-compile-4
gortium:feat/honcho-memory-provider
gortium:feat/hermes-dockerfile-workdir-httpx
gortium:merge/matrix-bridge-fix
gortium:feat/hermes-workspace-combined
gortium:feat/hermes-workspace-combined-entrypoint
gortium:feat/hermes-dashboard-env-healthchecks
gortium:feat/add-dashi-dashboard
gortium:feat/hermes-workspace
gortium:feat/hermes-workers
gortium:feat/add-paperclip
gortium:feat/hermes-chromium-dockerfile
gortium:feat/hermes-worker-anchor
gortium:feat/syncthing-org-sync
gortium:feat/docker-add-7zz-chm-extraction
gortium:fix/vpn-iptables-nft-v3
gortium:fix/vpn-iptables-nft-v2
gortium:fix/vpn-iptables-nft-upstream
gortium:feat/act-runner
gortium:fix/himalaya-email-cli
gortium:fix/wg-easy-iptables-nft
gortium:feat/hermes-custom-tools-startup
gortium:feat/hermes-fork-dockerfile
gortium:fix/hermes-timezone-v2
gortium:feat/wireguard-vpn
gortium:feat/hermes-voice-gpu-support
gortium:feature/hermes-browser-v2
gortium:feat/dockerfile-pr3-latex
gortium:feat/dockerfile-pr2-chromium-browser
gortium:feat/dockerfile-pr4-qemu
gortium:feat/dockerfile-pr5-emacs
gortium:fix/network-creation
gortium:fix/hermes-timezone-setting
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "env-vars-for-domain"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replace all hardcoded
lazyworkhorse.netURLs in docker-compose YAML files with${DOMAIN}variable substitution. Create.env.productionand.env.stagingenvironment files. Update Makefile with environment selection support.Changes
Compose files (13 files)
Every reference to
lazyworkhorse.netin compose YAML values is now${DOMAIN}:Host(`subdomain.${DOMAIN}`)GITEA__server__ROOT_URL=https://code.${DOMAIN}https://auth.${DOMAIN}/WG_HOST=vpn.${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.netMakefile
ENVvariable (default: production) withENV_FILE=.env.$(ENV)docker composeanddocker stackcommands now pass--env-file $(ENV_FILE)stagingandproductionconvenience targetsenvtarget to show current settingsCOMPOSE_PATHchanged to?=for override supportNot changed
Usage
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 productionView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.