Deploy: docker compose down before pull/up, not just up -d
up -d alone assumes the previous container releases port 8420 cleanly before the new one binds -- it doesn't force that. The last three deploys all failed with "port is already allocated" at exactly that step; running compose down first (confirmed working when done manually over SSH) guarantees the old container is fully stopped and removed before the new one starts, closing the race.
This commit is contained in:
@@ -69,4 +69,4 @@ jobs:
|
||||
ssh-keyscan -p "$DEPLOY_PORT" "$DEPLOY_HOST" >> ~/.ssh/known_hosts 2>/dev/null
|
||||
ssh -i ~/.ssh/deploy_key -p "$DEPLOY_PORT" -o StrictHostKeyChecking=yes \
|
||||
espressoframe_deployer@"$DEPLOY_HOST" \
|
||||
'cd ~/espresso-frame && docker compose pull && docker compose up -d'
|
||||
'cd ~/espresso-frame && docker compose down && docker compose pull && docker compose up -d'
|
||||
|
||||
Reference in New Issue
Block a user