-
Create a
.env
file from.env.dist
$ cp .env.dist .env && nano .env $ cd app && cp .env.dist .env
-
Build and run the stack in detached mode (stop any system's ngixn/apache2 service first)
$ docker-compose build $ docker-compose up -d
-
Prepare the Symfony application
-
Update Symfony env variables (.env)
#... DATABASE_URL=mysql://db_user:db_password@mysql:3306/db_name #...
-
Composer install & update the schema from the container
$ docker-compose exec php-fpm bash $ composer install $ symfony doctrine:schema:update --force
-
🎉 Now we can stop our stack with docker-compose down
and start it again with docker-compose up -d