add .gitignore to ignore /var/logs and /var/lib/mysql
This commit is contained in:
parent
bb220f44dc
commit
d1d72e7b9f
|
@ -0,0 +1 @@
|
|||
/virtual/var
|
|
@ -44,13 +44,14 @@ MariaDB will have its whole data folder (_i.e. `/var/lib/mysql`_) on the host in
|
|||
> 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>
|
||||
> ```
|
||||
>
|
||||
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
|
||||
|
||||
Also logs will be mounted the same way in order for developers to easily check these out when needed (_e.g. `virtual/var/log/apache2/access.log`_). Also, note that even if the container is removed, the logs will remain.
|
||||
|
|
Loading…
Reference in New Issue