Skip to content

Commit a13cfe1

Browse files
committed
update README
1 parent e874989 commit a13cfe1

File tree

1 file changed

+25
-29
lines changed

1 file changed

+25
-29
lines changed

README.md

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,11 @@
44

55
![](http://www.maxpou.fr/images/articles/symfony-docker/schema-v2.png)
66

7-
Docker-symfony gives you everything you need for developing Symfony application. This complete stack run with docker and [docker-compose](https://docs.docker.com/compose/).
7+
Docker-symfony gives you everything you need for developing Symfony application. This complete stack run with docker and [docker-compose (1.7 or higher)](https://docs.docker.com/compose/).
88

99
## Installation
1010

11-
1. Retrieve git project
12-
13-
```bash
14-
$ git clone https://github.com/maxpou/docker-symfony
15-
```
16-
17-
2. In the docker-compose file, indicate where's your Symfony project
11+
1. In the docker-compose file, indicate where's your Symfony project
1812

1913
```yml
2014
services:
@@ -23,14 +17,15 @@ Docker-symfony gives you everything you need for developing Symfony application.
2317
- path/to/your/symfony-project:/var/www/symfony
2418
```
2519
26-
3. Build containers with (with and without detached mode)
20+
2. Build/run containers with (with and without detached mode)
2721
2822
```bash
23+
$ docker-compose build
2924
$ docker-compose up
3025
$ docker-compose up -d
3126
```
3227

33-
4. Update your host file (add symfony.dev)
28+
3. Update your system host file (add symfony.dev)
3429

3530
```bash
3631
# get containers IP address and update host (replace IP according to your configuration)
@@ -41,23 +36,25 @@ Docker-symfony gives you everything you need for developing Symfony application.
4136

4237
**Note:** If it's empty, run `docker inspect $(docker ps -f name=nginx -q) | grep IPAddress` instead.
4338

44-
5. Prepare Symfony app
39+
4. Prepare Symfony app
4540
1. Retrieve DB&Redis IP
4641

4742
```bash
48-
$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' $(docker ps -f name=db -q)
49-
$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' $(docker ps -f name=redis -q)
43+
$ docker inspect --format '{{ .NetworkSettings.Networks.dockersymfony_default.IPAddress }}' $(docker ps -f name=db -q)
44+
$ docker inspect --format '{{ .NetworkSettings.Networks.dockersymfony_default.IPAddress }}' $(docker ps -f name=redis -q)
5045
```
5146

5247
**Note:** If it's empty, run `docker inspect $(docker ps -f name=db -q) | grep IPAddress` instead.
5348

5449
2. Update app/config/parameters.yml
5550

5651
```yml
57-
# path/to/sfApp/app/config/parameters.yml
52+
# path/to/your/symfony-project/app/config/parameters.yml
5853
parameters:
59-
redis_host: redis
6054
database_host: mysqldb
55+
database_password: root
56+
#...
57+
redis_host: redis
6158
```
6259

6360
3. Composer install & create database
@@ -75,7 +72,7 @@ Docker-symfony gives you everything you need for developing Symfony application.
7572
$ sf3 doctrine:fixtures:load --no-interaction
7673
```
7774

78-
6. Enjoy :-)
75+
5. Enjoy :-)
7976

8077
## Usage
8178

@@ -147,25 +144,24 @@ $ docker rmi $(docker images -q)
147144

148145
## FAQ
149146

147+
* How I can add PHPMyAdmin?
148+
Simply add this: (then go to [symfony.dev:8080](http://symfony.dev:8080))
149+
150+
```
151+
phpmyadmin:
152+
image: phpmyadmin/phpmyadmin
153+
ports:
154+
- "8080:80"
155+
links:
156+
- db
157+
```
158+
150159
* Got this error: `ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
151160
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.` ?
152161
Run `docker-compose up -d` instead.
153162

154163
* Permission problem? See [this doc (Setting up Permission)](http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup)
155164

156-
* How I can add PHPMyAdmin?
157-
Simply add this: (then go to [symfony.dev:8080](http://symfony.dev:8080))
158-
159-
```
160-
phpmyadmin:
161-
image: phpmyadmin/phpmyadmin
162-
ports:
163-
- "8080:80"
164-
links:
165-
- db
166-
```
167-
168-
169165
## Contributing
170166

171167
First of all, **thank you** for contributing ♥

0 commit comments

Comments
 (0)