This is a fork of https://github.com/maxpou/docker-symfony, adjusted to my own needs. At the time of writing, the aforementioned repo did not support Symfony 4.3 and 5.0, so I changed some Nginx config. This docker-compose config also uses PHP 7.4.1 instead of 7.0. Elk was removed, phpMyAdmin was added.
You need to have Docker and docker-compose installed. These following commands are for installing these if you're on Debian. If you're not, just Google and there'll be a guide for your distro.
- Install Docker
$ sudo apt-get update
$ sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io- Install docker-compose
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose- Clone/download this repo
$ sudo apt-get update
$ sudo install git
$ git clone https://github.com/jessedezwart/docker-symfony.git- Create a
.envfrom the.env.distfile. Adapt it according to your symfony application
$ cp .env.dist .env- Move your whole Symfony application to the application folder.
- Change permissions of the application
$ chmod -R 755 ./application
$ chmod -R 777 ./application/var/- Run containers
$ docker-compose up -d