Usage - Heyfara/sf-docker GitHub Wiki

Using this docker project is pretty simple.

  1. Put your Symfony files inside volumes/www/
  2. Run : $ docker-compose up

Your Symfony should be accessible at http://localhost

Timezone

The default timezone is Europe/Paris. You can change it simply by editing the last line in /dockerfiles/apache/Dockerfile.

Doctrine

If you want to use doctrine in your application, you have to edit the following lines in parameters.yml :

database_host: mysql, 
database_user: admin, 
database_password: password, 

The database_host is the name of the container described in docker-compose.yml. In this case it is mysql. You can also find out this name by connecting to the running container and displaying the /etc/hosts file.

The database user is admin by default.

The database_password can be set in /dockerfile/mysql/Dockerfile using the environment variable MYSQL_PASS.