diff --git a/Dockerfile b/Dockerfile index b42d2ac..07ab000 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,8 @@ ENV NODE_ENV=production \ HOST=0.0.0.0 \ PORT=3000 \ PB_PORT=8090 \ - PB_URL=http://127.0.0.1:8090 + PB_URL=http://127.0.0.1:8090 \ + SHOPIFY_TOKEN_CACHE=/app/pb_data/shopify-token.json # Install production dependencies only (react + @tanstack/* — no vite, # tailwind, eslint or typescript ship in the runtime image). diff --git a/deploy.sh b/deploy.sh index 2b8cfe6..5d19a74 100755 --- a/deploy.sh +++ b/deploy.sh @@ -2,6 +2,7 @@ set -euo pipefail parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P ) cd "$parent_path" || exit +git pull if [ 1 -eq "$#" ] then make build-production TAG="$1" diff --git a/entrypoint.sh b/entrypoint.sh index bdf1386..8ef8956 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -25,7 +25,9 @@ PB_PID=$! # when records already exist or no superuser env is provided) ( sleep 2 - if node scripts/pb-seed.mjs; then + if [ ! -f scripts/pb-seed.mjs ]; then + echo "[entrypoint] WARNING: scripts/pb-seed.mjs missing from image — the image was built from a stale checkout; rebuild it" + elif node scripts/pb-seed.mjs; then echo "[entrypoint] pocketbase seed complete" else echo "[entrypoint] pocketbase seed skipped/failed — site falls back to bundled defaults"