Docker development environment ready for Symfony Flex projects.
203
Docker development environment ready for Symfony Flex projects.
docker run -it --rm -v $(pwd):/app composer:latest composer create-project symfony/skeleton .
git clone [email protected]:graillus/docker-symfony.git
cd docker-symfony
cp -R * .* /path/to/project
In your project root directory, just build and lauch the containers:
docker-compose build
docker-compose up -d
If you want to use Xdebug remote debugging, you need to configure the Xdebug remote host.
Edit the docker-compose.yaml file :
php-fpm:
...
environment:
XDEBUG_CONFIG: remote_host=172.20.0.1 # IP shown in the symfony profiler
Now configure your IDE with the following parameters:
Map your local project directory to /var/www/app on the remote.
Restart the containers and start listening for debug connections.
To enable blackfire agent, uncomment the blackfire service definition in the docker-compose.yaml file.
Don't forget to define the required environment variables or add them to your .env file so the blackfire agent/client gets the right credentials.
Read the blackfire documentation for more details.
WTFPL v2

See the LICENSE file.
Content type
Image
Digest
Size
66.8 MB
Last updated
over 8 years ago
docker pull graillus/php-symfony