Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

On my local machine, I have a very simple proof of concept that uses docker-compose to run Django in one container, Redis in a second container, and a Celery worker in a third container. It “works on my machine”.
How do I deploy this to DigitalOcean? How do I implement blue/green deployment using DigitalOcean assets?
For a Django application, without Celery and Redis, it seems straightforward. I can build, tag, and push the Django container into the DO registry, and then use doctl to deploy my application, update environment variables, and switch the floating IP between the green and blue servers. Great.
docker build -t <container> .
docker tag <container>:latest registry.digitalocean.com/<repo>/<container>:latest
docker push registry.digitalocean.com/<repo>/<container>:latest
doctl apps create-deployment <app-id>
doctl apps update <app-id> --spec <prod.yaml>
doctl compute floating-ip-action assign <floating-ip> <new-prod-droplet-id>
Now how do I set up Celery and Redis? I know I can stand up a Redis DB cluster, but do I need a separate droplet to run the Celery worker? Or is there a way to run the Celery worker from the same compute resource as my containerized Django app? What’s the best practice here?
Matteo Scarpa
Matteo Scarpa
KFSys
4ae272398ee6445a9bf73f4cd632b5
KFSys
phosphide
KFSys
KFSys
garantieheld
KFSys