Adding Celery to a Django app running in Docker on AWS

Hi everyone!

I want to add async task execution with Celery to a Django app that’s currently running on AWS ElasticBeanstalk with Docker and I’m having a bit of trouble figuring out the simplest way forward.

As far as I see, I have the following options:

1.- Run everything in ElasticBeanstalk with the “multicontainer” option that’s available (one container for django and other containers for celery, monitoring, etc).
2.- Modify my current image to run both django and celery (keep everything in one container).
3.- Migrate to a more complex infrastructure like using Elastic Container Service directly, which IMHO probably is overkill but might end up being the cleanest solution.

Any advice regarding best practices, opinions on the options listed above or regarding other options I’ve probably missed is greatly appreciated!

1 Like

After a bit of work and digging in forums I already managed to deploy an nginx + django + redis setup to ElasticBeanstalk using MultiContainer Docker so I think I’ll stay with this and add Celery.

I’d still love to hear people’s opinions though! How have you solved similar deployments?

And if anybody is interested in the way I’m currently deploying I’d also be happy to help.

1 Like

HI Cristóbal,
If possible can you help me with Django Celery setup as your on elasticbeanstalk?
Thanks & Regards,
VIkram