Skip to content

Parameterize build-local.sh registry/server/path via env vars - #5

Open
johnnyxmas wants to merge 1 commit into
janholtzhausen:mainfrom
johnnyxmas:fix/parameterize-build-local
Open

johnnyxmas wants to merge 1 commit into
janholtzhausen:mainfrom
johnnyxmas:fix/parameterize-build-local

Conversation

@johnnyxmas

Copy link
Copy Markdown

Summary

Closes #4.

REGISTRY, SERVER, SERVICE, and the SSH deploy target (user + path) were hardcoded directly as shell variables, so anyone besides the original deployment had to edit four separate values in the script before it would run at all in their own environment.

Change

Each value now reads from an env var, falling back to the current hardcoded value as the default -- so this is a no-op for the existing deployment (running ./build-local.sh with no env vars set produces byte-identical behavior), while making the script usable elsewhere via e.g.:

READARR_BUILD_REGISTRY=myregistry:5000 READARR_DEPLOY_SERVER=nas.local READARR_DEPLOY_USER=admin READARR_DEPLOY_PATH=/volume1/docker/readarr ./build-local.sh

Test plan

  • Diffed against the original to confirm every default value is preserved exactly
  • Ran with overrides set for a different registry/server/path locally to confirm the substitution works as expected

REGISTRY, SERVER, SERVICE, and the SSH deploy target (user + path) were
hardcoded directly as shell variables, meaning anyone besides the
original maintainer had to edit four separate values before the script
would work in their own environment.

Move each to an env var with the current value as the default, so the
script keeps working unchanged for the existing deployment while
becoming usable elsewhere via e.g.:

  READARR_BUILD_REGISTRY=myregistry:5000   READARR_DEPLOY_SERVER=nas.local   READARR_DEPLOY_USER=admin   READARR_DEPLOY_PATH=/volume1/docker/readarr   ./build-local.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build-local.sh hardcodes maintainer-specific registry/server/paths

1 participant