Skip to content

Commit 3410213

Browse files
author
Michaël Perrin
committed
Update README
1 parent f354748 commit 3410213

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Docker configuration to run a Symfony app.
33
## Run
44

55
docker-compose up -d
6+
docker-compose exec php composer install
67

78
You can now visit http://localhost and see the default Symfony page.
89

@@ -15,16 +16,43 @@ Symfony commands:
1516

1617
## Included stuff
1718

19+
### Nginx
20+
21+
The official Nginx image is used with a slight addition for permissions.
22+
23+
The virtual host is defined in the [app.conf](docker/nginx/app.conf) file. This file is shared with the container
24+
as defined in the `docker-compose.yml` file. I prefer to share the host like this instead of using `COPY` in the Dockerfile
25+
as there is no need to build a new image if the host changes. A simple `docker-compose up -d` will take
26+
the new host into account.
27+
28+
### PHP-FPM
29+
30+
PHP-FPM 7.0 is installed with the following configuration:
31+
32+
* Necessary extensions for Symfony
33+
* MySQL
34+
* GD
35+
* Composer
36+
* PHPUnit
37+
* Xdebug
38+
39+
1840
### Xdebug
1941

2042
Making Xdebug working with Docker is quite tricky as there is currently a limitation to Docker for Mac
2143
that prevents a container to make a request to the the host, which is exactly what we would like to do with Xdebug.
2244

23-
To make Xdebug debugging work, you will first need to run this command:
45+
To make Xdebug debugging work, you will first need to run this command on the host:
2446

2547
sudo ifconfig lo0 alias 10.200.10.1/24
2648

27-
This IP address is configured in the environment variables of the PHP container (see `docker-compose.yml` file).
49+
This IP address is configured in the environment variables of the PHP container, in the `docker-compose.yml` file:
50+
51+
services:
52+
php:
53+
# ...
54+
environment:
55+
XDEBUG_REMOTE_HOST: 10.200.10.1
2856

2957
No extra configuration is needed in your IDE (tested on Sublime Text, Visual Studio Code and Atom), apart the usual.
3058

0 commit comments

Comments
 (0)