Skip to content
This repository was archived by the owner on Oct 9, 2022. It is now read-only.

Configuration

Alexandre Jardin edited this page Oct 29, 2018 · 5 revisions

Environment variables

You can edit the environment variables that will be used inside your containers by editing the .env. Exactly like what you are used to do with a Symfony application.

Nginx configuration

There are two files inside the nginx/conf.d/ directory:

  • symfony.conf contains the default configuration for PHP-FPM, and also a commented configuration that you can use to configure your own host. To do that, copy it inside a new file called custom.conf in the same directory. You are free to do whatever you want with this file. Just remember to restart the environment when a change is performed.
  • symfony.conf.sample contains a default configuration for a Symfony application. It's designed to be included by another configuration, like the one described in symfony.conf. It was built from the Symfony recommendations.

PHP configuration

The php/conf.d/custom.ini was also built from the Symfony recommendations. It improves the global performances of the application in a development context. Send us a pull request if you want to modify something inside.

Makefile

One of the main features of this project is the ability to manage the environment from the project directory itself. To achieve that, you have to use a Makefile. An example is distributed with the source under the name Makefile.sample.

And to manage the Docker environment from the project directory:

  • If you already have a Makefile in your project, copy the content of the docker/Makefile.sample file at the top of it.
  • If you do not already have a Makefile, copy the docker/Makefile.sample file in your project and remove the extension.

🚀 That's all!

Here are several commands that you can now use from your project directory.

$ make

 ----------------------------------------------------------------------------
   Environment
 ----------------------------------------------------------------------------

backup                         Backup the "postgresql" volume
build                          Build the environment
cache                          Flush cache stored in Redis
composer                       Install Composer dependencies from the "php" container
logs                           Follow logs generated by all containers
logs-full                      Follow logs generated by all containers from the containers creation
nginx                          Open a terminal in the "nginx" container
php                            Open a terminal in the "php" container
ps                             List all containers managed by the environment
restore                        Restore the "postgresql" volume
start                          Start the environment
stats                          Print real-time statistics about containers ressources usage
stop                           Stop the environment
yarn                           Install Composer dependencies from the "php" container
Clone this wiki locally