update readme | fix docker-compose
This commit is contained in:
parent
4b41ff7a00
commit
a21dff7235
10
README.md
10
README.md
|
@ -47,6 +47,14 @@ The **apache** and **php** configuration will be on the host machine (for easy m
|
|||
|
||||
MariaDB will have its whole data folder (_i.e. `/var/lib/mysql`_) on the host in the _virtual_ folder to have the data remaining throughout containers. This property makes the database consistent and persistent among container creation/deletion.
|
||||
|
||||
> In a real-world environment, we would not store the whole data folder (in fact it would be in the _.gitignore_), but we would add a script to dump a SQL file into the database when using the environment for the first time :
|
||||
>
|
||||
> ```bash
|
||||
> cat backup.sql | docker exec -i mariadb mysql -uroot -p<password>
|
||||
> ```
|
||||
>
|
||||
> Then, the volumes would be shared and persistent on the host.
|
||||
|
||||
|
||||
|
||||
###### c) Log files
|
||||
|
@ -71,7 +79,7 @@ The whole system will only expose its port `8080` ;
|
|||
|
||||
> We do not use the default HTTP port not to break a possible web server on the host.
|
||||
|
||||
Containers between them will be connected through the `privnet` network which is unreachable from the host ; except for the port 8080.
|
||||
Containers between them will be connected through the `privnet` network which is also reachable from the host ; except for the port 8080.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ services:
|
|||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: vhost
|
||||
MYSQL_USER: php
|
||||
MYSQL_PASSWORD: 4JB1dtbrIC8pT935
|
||||
MYSQL_PASSWORD: Ew1RmFFqeZOA1zwkJkocAjmepQA4JmnUW0nqDFh79jHY8aubtPO_12E9wgbNvScX0Uiv1GuUllb8YCJ00PAoh0fvNS
|
||||
volumes:
|
||||
- ./virtual/var/lib/mysql:/var/lib/mysql
|
||||
networks:
|
||||
|
|
Loading…
Reference in New Issue