Zero downtime deployment for compose services
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
What problem will this feature address?
According to the docs, when deploying, it stops the latest running container in order to replace with the new container after deployment.
I could not find a way to set this up for Compose. It seems Application-specific.
Durint the deployment process, it stops the current running container, if the deployment fails, we have a big problem because now nothing works.
Describe the solution you'd like
It would be nice to keep the service alive and only replace the application when the deployment is successful, this way the service is always alive.
If the deployment fails, then we still have the old version running, that is certainly better than not having it working at all.
Describe alternatives you've considered
I didn't.
Additional context
Let's say I have a Compose file that contains the following services: api and db, where api is my API application (written with FastAPI, for example) and db is my PostgreSQL instance that my API requires.
My API would have a /api/ping endpoint that could be used as healthcheck endpoint.
Will you send a PR to implement it?
Yes, but I will need some guidance in order to make it an option, not a rule. Of couse, not everyone thinks the same thing as me, but I am pretty sure that this feature would help a lot of people too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names the zero-downtime documentation and Compose services, but no repository files or tests. Start by reading the linked documentation and locating the Compose deployment entry point; determine how an optional health-check and replacement flow should preserve the old service when deployment fails, then add coverage for successful and failed deployments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100