This example makes use of Nginx, MySQL and PHP-FPM docker containers to run Symfony application. All you have to do is, create files listed below and copy your symfony application into the root folder or do the opposite. After all, just run the docker-compose command to build the system. That’s all!

Structure

I would suggest you to checkout the alternative structure version right at the bottom of this post.

$ tree -a
.
├── docker
│   ├── mysql
│   │   ├── Dockerfile
│   │   ├── init.sh
│   │   └── mysqld.cnf
│   ├── nginx
│   │   ├── default.conf
│   │   ├── Dockerfile
│   │   └── nginx.conf
│   └── php
│       ├── app.sh
│       ├── Dockerfile
│       ├── init.sh
│       ├── install.sh
│       ├── php.ini
│       └── www.conf
├── docker-compose.yml
├── public ## You can remove this
│   └── index.php
├── .env
└── .env.dist ## Create a .env file from this

#docker #symfony #nginx

Creating A Dockerised Symfony Application Skeleton
1.10 GEEK