When I was learning about Docker I was often told it's the best practice to run technologies in separate containers. For example, if I need nginx
and php-fpm
for my project, I should create a docker-compose.yml
file and run two separate containers.
Now I'm learning about Azure App Services and I'm getting the impression it wants me to do the exact opposite.
If I have just one Dockerfile
with php
and nginx
(without the Compose), it runs very well. Most importantly, CI/CD between Github repository and App Service can be set up with just a few clicks in Azure Portal.
If, however, I want to use docker-compose.yml
and run php
and nginx
containers separately, I don't get the CI/CD with Github automatically. I can only setup CI/CD with Azure Container Registry. Also, it doesn't read the docker-compose.yml
file from my repository automatically, I have to upload it in Azure Portal instead. It seems that Compose is only half-supported, with many inconveniences along the way.
Given how hard it seems to be to run docker-compose.yml on App Service, is it recommended to run a single Dockerfile instead?