Django, Celery, and Celery beat via Copilot. Use Sidecars or multiple services?
I am able to easily deploy a Django application via Copilot. But now I need a Celery worker and beat. Sidecars sounds like what I want. Basically, define two new sidecars: one for a Celery worker and another for a Celery beat. But then I came across Developing an application based on multiple microservices using AWS Copilot and AWS Fargate. This takes the approach of deploying the other docker containers as their own services.
It's not exactly clear to me which approach is best for my needs. Sidecars seems simpler and more straight forward. The only thing unclear to me on how to establish with it is the image (required) parameter. Why a URL? Why not a reference to the Dockerfile to build the worker and another one for the beat?
Update. I decided to proceed forward with using Sidecars. The reason being is that the the Celery containers are built with the same Dockerfile as the Django container. In other words, whatever code the Django container is running must be identical as the code within the Celery containers. With this, it is essential that whenever the Django container is deployed, the corresponding Celery containers are also deployed with it at the same time. If I were to go with the separate service approach, this would mean that everything would need to be deployed individually and separately. This would be a major problem, because this means there would be a temporary difference in deployed code between Django and the Celery containers, which will likely produce undesirable behavior.