fix: resolve Docker container removal race condition in deployment
All checks were successful
Release / Test backend (push) Successful in 1m3s
Release / Test UI (push) Successful in 1m50s
Release / Build and push images (push) Successful in 7m32s
Release / Deploy to homelab (push) Successful in 16s
Release / Gitea Release (push) Successful in 27s
Release / Deploy to prod (push) Successful in 2m21s
All checks were successful
Release / Test backend (push) Successful in 1m3s
Release / Test UI (push) Successful in 1m50s
Release / Build and push images (push) Successful in 7m32s
Release / Deploy to homelab (push) Successful in 16s
Release / Gitea Release (push) Successful in 27s
Release / Deploy to prod (push) Successful in 2m21s
Issue: Two sequential 'docker compose up' commands caused race condition: - First command (--no-deps) starts removing containers - Second command (--remove-orphans) tries to remove same containers - Result: 'removal of container is already in progress' error Fix: Combine into single command with both flags: docker compose up -d --no-deps --remove-orphans <services> This ensures atomic operation without race conditions.
This commit is contained in:
@@ -130,9 +130,7 @@ jobs:
|
||||
'set -euo pipefail
|
||||
cd /opt/libnovel
|
||||
doppler run -- docker compose pull backend runner ui caddy pocketbase
|
||||
# Restart only the services with new images, without waiting for dependencies
|
||||
doppler run -- docker compose up -d --no-deps backend runner ui caddy pocketbase
|
||||
doppler run -- docker compose up -d --remove-orphans'
|
||||
doppler run -- docker compose up -d --no-deps --remove-orphans backend runner ui caddy pocketbase'
|
||||
|
||||
# ── deploy homelab runner ─────────────────────────────────────────────────────
|
||||
# Syncs the homelab runner compose file and restarts the runner service.
|
||||
|
||||
Reference in New Issue
Block a user