diff --git a/deploy.sh b/deploy.sh index c0a3555..0a05716 100755 --- a/deploy.sh +++ b/deploy.sh @@ -6,7 +6,14 @@ # ./deploy.sh erpnext (rebuild + migrate ERPNext, re-extract assets) # ./deploy.sh api workers (rebuild a custom set) set -euo pipefail -cd /opt/performancewest +# cd to this script's own directory so the deploy operates on the clone it lives +# in. Previously this was hardcoded `cd /opt/performancewest`, which meant +# running /opt/performancewest-dev/deploy.sh silently rebuilt PROD instead of +# dev (the dev script is an identical copy). Resolving the real path makes the +# same script correct in every clone; docker compose then derives the project +# name + auto-loads docker-compose.override.yml from this directory, so dev +# (project performancewest-dev, dev port remaps) and prod stay isolated. +cd "$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" SERVICES="${@:-site api workers proxy-relay listmonk-hc}"