In short
If you need an additional service in your project, you should configure it on the Divio Cloud, not in docker-compose.yml
. docker-compose.yml
is only used for local development purposes, and is ignored in deployment.
The longer answer
In Divio Cloud projects, docker-compose.yml
is used to orchestrate all the services and containers in the local development environment only.
In the actual hosting environment, it's not used at all, and is simply ignored. Locally, your project has all the containers defined in the docker-compose.yml
file - web
, db
and whatever else you define.
When your project is deployed on the hosting environment, only the web
container is used.
The other containers are used locally for convenience, to replicate services that are part of the infrastructure.
For example, locally you have a db
container running the Postgres database. In the cloud infrastructure, the web
container connects to a Postgres cluster.
Similarly, if you have Celery in your cloud project, it will use backing services provided as part of the cloud infrastructure, but when you set up the same project locally, it will build them in new Docker containers.
More information at docker-compose.yml
reference in the Divio Cloud Developer Handbook.
Note: I am a member of the Divio team. This question is one that we see quite regularly via our support channels.