Donal McBreen 8a41d15b69 Zero downtime deployment with cord file
When replacing a container currently we:
1. Boot the new container
2. Wait for it to become healthy
3. Stop the old container

Traefik will send requests to the old container until it notices that it
is unhealthy. But it may have stopped serving requests before that point
which can result in errors.

To get round that the new boot process is:

1. Create a directory with a single file on the host
2. Boot the new container, mounting the cord file into /tmp and
including a check for the file in the docker healthcheck
3. Wait for it to become healthy
4. Delete the healthcheck file ("cut the cord") for the old container
5. Wait for it to become unhealthy and give Traefik a couple of seconds
to notice
6. Stop the old container

The extra steps ensure that Traefik stops sending requests before the
old container is shutdown.
2023-09-06 14:35:30 +01:00
2023-08-22 08:24:31 -07:00
2023-08-22 08:24:31 -07:00
2023-08-22 08:24:31 -07:00
2023-08-22 08:24:31 -07:00
2023-03-10 19:40:57 +00:00
2023-08-24 09:16:13 -07:00
2023-08-23 15:15:51 +02:00
2023-01-07 15:32:25 +01:00
2023-08-22 17:11:26 -07:00

Kamal: Deploy web apps anywhere

From bare metal to cloud VMs using Docker, deploy web apps anywhere with zero downtime. Kamal uses the dynamic reverse-proxy Traefik to hold requests, while the new app container is started and the old one is stopped — working seamlessly across multiple hosts, using SSHKit to execute commands. Originally built for Rails apps, Kamal will work with any type of web app that can be containerized with Docker.

➡️ See kamal-deploy.org for documentation on installation, configuration, and commands.

Contributing to the documentation

Please help us improve Kamal's documentation on the the basecamp/kamal-site repository.

License

Kamal is released under the MIT License.

Description
Deploy web apps anywhere.
Readme 4 MiB
Languages
Ruby 98.1%
Dockerfile 1%
Shell 0.9%