ci(deploy): mount postgres init as a DIRECTORY (fix 'Is a directory')
CI/CD / CI · Web (tsc) (push) Successful in 1m8s
CI/CD / Deploy · full stack (push) Successful in 2m50s

The single-file bind mount ./scripts/init-db.sh left a stale empty dir in the
reused act_runner workspace → mounted as a directory → migrations never ran →
empty schemas → backend 28P01/connection failures. Move the init script to
deploy/postgres-initdb/00-init.sh and mount the whole DIR at
/docker-entrypoint-initdb.d (robust, like the migrations dir). Deploy checkout
now 'git clean -ffd' to purge stale workspace dirs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-12 21:39:15 +03:30
parent c67d746004
commit 514cd3705f
3 changed files with 8 additions and 3 deletions
+3
View File
@@ -66,6 +66,9 @@ jobs:
git config http.extraheader "Authorization: Bearer ${TOKEN}"
git fetch --depth=1 origin "${REF}"
git checkout -f FETCH_HEAD
# Remove stale Docker-created bind-mount dirs from a previous run (e.g. an
# empty scripts/init-db.sh dir) so they don't shadow real files. -e keeps .env.
git clean -ffd -e .env || true
- name: Write .env (from ENV_FILE secret)
run: printf '%s' "$ENV_FILE" > .env