add .gitignore to ignore /var/logs and /var/lib/mysql

This commit is contained in:
Adrien Marquès 2018-09-26 16:23:06 +02:00
parent bb220f44dc
commit d1d72e7b9f
2 changed files with 5 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/virtual/var

View File

@ -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 : > 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 > ```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. > Then, the volumes would be shared and persistent on the host.
###### c) Log files ###### 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. 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.