Fix deploy/rebuild: use absolute paths to avoid cd + Compose v5 CWD issues
This commit is contained in:
parent
36c0d7b2aa
commit
359260fcef
1 changed files with 4 additions and 2 deletions
|
|
@ -223,11 +223,13 @@ async function runRemote(target, repoName, cmd, label) {
|
|||
}
|
||||
|
||||
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) {
|
||||
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 ────────────────────────────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue