Menu

1 / 2

Zero-Downtime Django Deploys on One Small Droplet

DEV Community: docker·Vicente G. Reyes·about 5 hours ago
#sA69slNW
#devtodocker#devto#dev#docker#container
Reading 0:00
15s threshold

GiggleGigs is a job board I run: Django + DRF on the backend, React + Vite on the front (on Vercel), Celery for background work, all in Docker Compose on a single 2 GB DigitalOcean droplet , with Traefik in front and Cloudflare in front of that.

In the last post I moved image builds off the droplet and into GitHub Actions. That stopped deploys from freezing the server. It didn't stop them from taking the site down.

Why 99.99% means deploys can't cause any downtime

99.99% uptime allows about 4.3 minutes of downtime a month .

I measured a normal deploy with a loop that requested the API every 5 seconds: about two minutes of no available server from Traefik. I deploy several times a day. At that rate, a single morning of deploys would use up the month's budget.

So "faster deploys" wasn't the goal.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.