This contains a couple core file that can be used to deploy a Symfony Application built for Azure AppService. The basic process involves copying the source files into a symfony project and the process of deplyoing is for the user to work out. Azure Samples
- A Docker file -
Dockerfile
- A supervisor configuration -
supervisord.conf
- ngnix web config -
symfony-prod.conf
The default configuration for azure is fairly basic and is not ideal for use with symfony. The docker container is running two services: ngnix and php-fpm. ngnix handles the request and the results are funneled to the php-fpm workers through a local local port on 9000. this configuration is more suited and runs significantly faster to the default cgi bin/apache configuration that comes default with azure when deploying with code. It's possible to enable extensions to improve the performance for code based configuration but a docker based configuration is more reproducible (php extensions).
The general process involes building the docker image in the root of the project and deploying it to a container registry. This can be either in azure, or a local instance. Azure devops integrates really well with azure and can be used to deploy to an azure registry that publishes the built images to azure app service. running the images to a public host like dockerhub can also be fairly ideal. more information can be found here.