Improve docker-compose

- Update mysql user/pass to dev/dev
 - Improve README
This commit is contained in:
Vincent Letourneau
2017-01-22 10:42:42 +01:00
parent f78334f321
commit aef24090a1
2 changed files with 12 additions and 12 deletions

View File

@@ -8,12 +8,12 @@ Docker running Nginx, PHP-FPM, MySQL and PHPMyAdmin.
## Images to use ## Images to use
* [Nginx](https://hub.docker.com/_/nginx/) (181.85 MB) * [Nginx](https://hub.docker.com/_/nginx/)
* [MySQL](https://hub.docker.com/_/mysql/) (400.2 MB) * [MySQL](https://hub.docker.com/_/mysql/)
* [PHP-FPM](https://hub.docker.com/r/nanoninja/php-fpm/) (635.9 MB) * [PHP-FPM](https://hub.docker.com/r/nanoninja/php-fpm/)
* [Composer](https://hub.docker.com/r/composer/composer/) (635.7 MB) * [Composer](https://hub.docker.com/r/composer/composer/)
* [PHPMyAdmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) (102.2 MB) * [PHPMyAdmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/)
* [Generate Certificate](https://hub.docker.com/r/jacoelho/generate-certificate/) (9.07 MB) * [Generate Certificate](https://hub.docker.com/r/jacoelho/generate-certificate/)
## Start using it ## Start using it
@@ -38,7 +38,7 @@ Docker running Nginx, PHP-FPM, MySQL and PHPMyAdmin.
## Directory tree ## Directory tree
```sh ```sh
. docker-nginx-php-mysql
├── bin ├── bin
│   └── linux │   └── linux
│   └── clean.sh │   └── clean.sh
@@ -67,7 +67,7 @@ Docker running Nginx, PHP-FPM, MySQL and PHPMyAdmin.
```php ```php
<?php <?php
$dsn = 'mysql:host=mysql;dbname=test;charset=utf8;port=3306'; $dsn = 'mysql:host=mysql;dbname=test;charset=utf8;port=3306';
$pdo = new PDO($dsn, 'root', 'root'); $pdo = new PDO($dsn, 'dev', 'dev');
?> ?>
``` ```
@@ -120,9 +120,9 @@ $ docker exec mysql sh -c 'exec mysqldump test -uroot -p"$MYSQL_ROOT_PASSWORD"'
Edit nginx file **etc/nginx/default.conf** and uncomment the server section. Edit nginx file **etc/nginx/default.conf** and uncomment the server section.
```nginx ```nginx
server { # server {
... # ...
} # }
``` ```
## Cleaning project ## Cleaning project

View File

@@ -43,7 +43,7 @@ services:
- MYSQL_DATABASE=test - MYSQL_DATABASE=test
- MYSQL_ROOT_PASSWORD=root - MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=dev - MYSQL_USER=dev
- MYSQL_PASSWORD=1234 - MYSQL_PASSWORD=dev
ports: ports:
- 3306:3306 - 3306:3306
volumes: volumes: