deploy: bring up the healthcare proxy-relay sidecar on prod and dev
deploy.sh: include proxy-relay in the default service set; it's an upstream image (ginuerzh/gost) with no build context, so exclude it from 'compose build' while keeping it in 'compose up'. deploy-dev.sh: rsync docker-compose.yml to the dev server (it was never synced, so new services like proxy-relay never reached dev) and add proxy-relay to the 'compose up --build' set.
This commit is contained in:
parent
a79d6b1906
commit
4f49fad7f9
2 changed files with 14 additions and 3 deletions
|
|
@ -8,7 +8,11 @@
|
|||
set -euo pipefail
|
||||
cd /opt/performancewest
|
||||
|
||||
SERVICES="${@:-site api workers}"
|
||||
SERVICES="${@:-site api workers proxy-relay}"
|
||||
|
||||
# proxy-relay is an upstream image (no build context). Build everything else,
|
||||
# but always include it in the `up` set so the healthcare proxy sidecar runs.
|
||||
BUILD_SERVICES="$(echo "$SERVICES" | tr ' ' '\n' | grep -v '^proxy-relay$' | tr '\n' ' ')"
|
||||
|
||||
echo "=== Pulling latest from git ==="
|
||||
git pull origin main
|
||||
|
|
@ -30,7 +34,7 @@ echo "=== Building: $SERVICES ==="
|
|||
case " $SERVICES " in
|
||||
*" erpnext "*) echo "--- staging custom Frappe apps ---"; bash erpnext/build.sh ;;
|
||||
esac
|
||||
docker compose build $SERVICES
|
||||
[ -n "${BUILD_SERVICES// }" ] && docker compose build $BUILD_SERVICES
|
||||
|
||||
echo ""
|
||||
echo "=== Restarting: $SERVICES ==="
|
||||
|
|
|
|||
|
|
@ -55,10 +55,17 @@ for f in site/Dockerfile site/nginx.conf site/package.json site/astro.config.mjs
|
|||
fi
|
||||
done
|
||||
|
||||
# Keep the dev compose file in sync with git so service changes (e.g. the
|
||||
# healthcare proxy-relay sidecar) actually reach dev. The .env is server-managed
|
||||
# and not overwritten.
|
||||
rsync -avz -e "$SSH" docker-compose.yml "$REMOTE:$DEV_DIR/docker-compose.yml"
|
||||
|
||||
echo ""
|
||||
echo "=== Rebuilding containers ==="
|
||||
|
||||
$SSH "$REMOTE" "cd $DEV_DIR && sudo docker compose up -d --build api site workers"
|
||||
# proxy-relay is an upstream image (no build context); `up --build` skips the
|
||||
# build for it but still (re)creates it from the compose definition.
|
||||
$SSH "$REMOTE" "cd $DEV_DIR && sudo docker compose up -d --build api site workers proxy-relay"
|
||||
|
||||
echo ""
|
||||
echo "=== Deploy complete ==="
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue