Fix deploy/rebuild: use absolute paths to avoid cd + Compose v5 CWD issues

This commit is contained in:
jtricerolph 2026-07-14 13:43:34 +00:00
parent 36c0d7b2aa
commit 359260fcef

View file

@ -223,11 +223,13 @@ async function runRemote(target, repoName, cmd, label) {
} }
async function deploy(target, repoName) { async function deploy(target, repoName) {
return runRemote(target, repoName, `cd ${target.path} && git pull && docker compose -f docker-compose.yml up -d --build`, 'deploy') const p = target.path
return runRemote(target, repoName, `git -C ${p} pull && docker compose -f ${p}/docker-compose.yml --project-directory ${p} up -d --build`, 'deploy')
} }
async function rebuild(target, repoName) { async function rebuild(target, repoName) {
return runRemote(target, repoName, `cd ${target.path} && docker compose -f docker-compose.yml up -d --build`, 'rebuild') const p = target.path
return runRemote(target, repoName, `docker compose -f ${p}/docker-compose.yml --project-directory ${p} up -d --build`, 'rebuild')
} }
// ── Routes ──────────────────────────────────────────────────────────────────── // ── Routes ────────────────────────────────────────────────────────────────────