https://github.com/graillus/docker-symfony
Docker environment and tools for symfony developers
https://github.com/graillus/docker-symfony
Last synced: about 2 months ago
JSON representation
Docker environment and tools for symfony developers
- Host: GitHub
- URL: https://github.com/graillus/docker-symfony
- Owner: graillus
- License: wtfpl
- Created: 2016-11-12T12:43:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-15T08:50:22.000Z (about 7 years ago)
- Last Synced: 2025-01-15T22:39:35.094Z (3 months ago)
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
docker-symfony
==============Docker development environment ready for Symfony Flex projects.
## Features
- php-fpm (alpine)
- nginx (alpine)
- composer
- Xdebug
- Blackfire## Requirements
- Recent version of docker and docker-compose
- An existing symfony installation :
```sh
docker run -it --rm -v $(pwd):/app composer:latest composer create-project symfony/skeleton .
```## Installation
- Clone the repository
```sh
git clone [email protected]:graillus/docker-symfony.git
cd docker-symfony
```- Copy all files to target project root
```sh
cp -R * .* /path/to/project
```## Usage
In your project root directory, just build and lauch the containers:
```sh
docker-compose build
docker-compose up -d
```## Xdebug
If you want to use Xdebug remote debugging, you need to configure the Xdebug remote host.
Edit the _docker-compose.yaml_ file :
```yaml
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:
- IDE key: idekey
- host: localhost
- port: 80
- debugger: XdebugMap your local project directory to `/var/www/app` on the remote.
Restart the containers and start listening for debug connections.
## Blackfire
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](https://blackfire.io/docs/integrations/docker) for more details.
## License
WTFPL v2

See the LICENSE file.