change deploy logic to stop-first instead of start-first #53

Open
notplants wants to merge 2 commits from stop-first into master
Owner

I believe that this change fixes the issue described here: #52

I believe doing stop-first instead of start-first causes the old container to be stopped before the new one is started (see: https://docs.docker.com/reference/compose-file/deploy/#update_config).

start-first allows for zero-downtime updates, but can lead to resource contention between old and new containers (which is maybe why we were seeing unable to lock level db at /var/lib/gitea/data/queues/common: resource temporarily unavailable in the error log in the issue mentioned).

not totally sure about this, but the theory makes sense to me, and the app was able to successfully deploy after the change

I believe that this change fixes the issue described here: https://git.coopcloud.tech/coop-cloud/gitea/issues/52 I believe doing `stop-first` instead of `start-first` causes the old container to be stopped before the new one is started (see: https://docs.docker.com/reference/compose-file/deploy/#update_config). `start-first` allows for zero-downtime updates, but can lead to resource contention between old and new containers (which is maybe why we were seeing `unable to lock level db at /var/lib/gitea/data/queues/common: resource temporarily unavailable` in the error log in the issue mentioned). not totally sure about this, but the theory makes sense to me, and the app was able to successfully deploy after the change
notplants added 1 commit 2026-05-18 16:57:57 +00:00
notplants added 1 commit 2026-05-18 16:59:20 +00:00
Author
Owner

cc recent committers if you have any thoughts or extra knowledge about this @3wordchant @fauno @p4u1

cc recent committers if you have any thoughts or extra knowledge about this @3wordchant @fauno @p4u1
Owner

i just tested it with forgejo and it works! i can see in the logs that the container receives the shutdown signal and then it starts the new container. i didn't even had to restart abra app logs

i just tested it with forgejo and it works! i can see in the logs that the container receives the shutdown signal and then it starts the new container. i didn't even had to restart abra app logs
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin stop-first:stop-first
git checkout stop-first
Sign in to join this conversation.
No description provided.