Merge pull request #23 from MohammedAl-Mahdawi/persist-modules-folder

Persist modules folder content
This commit is contained in:
Mohammed Al-Mahdawi 2021-03-02 14:38:25 +03:00 committed by GitHub
commit e1df023d52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,7 @@ You could use something like the following commands to make backups for your dep
```shell ```shell
mkdir -p ~/backups mkdir -p ~/backups
for volume in akaunting-data akaunting-db; do for volume in akaunting-data akaunting-modules akaunting-db; do
docker run --rm -v $volume:/volume -v ~/backups:/backups alpine tar cvzf /backups/$volume-$(date +%Y-%m-%d).tgz -C /volume ./ docker run --rm -v $volume:/volume -v ~/backups:/backups alpine tar cvzf /backups/$volume-$(date +%Y-%m-%d).tgz -C /volume ./
done done
``` ```
@ -53,7 +53,7 @@ In order to restore those backups, you would run something like:
```shell ```shell
backup=2021-01-26 # you should select the backup you want to restore here backup=2021-01-26 # you should select the backup you want to restore here
for volume in akaunting-data akaunting-db; do for volume in akaunting-data akaunting-modules akaunting-db; do
docker run --rm -v $volume:/volume -v ~/backups:/backups alpine sh -c "rm -rf /volume/* /volume/..?* /volume/.[!.]* ; tar xvzf /backups/$volume-$backup.tgz -C /volume" docker run --rm -v $volume:/volume -v ~/backups:/backups alpine sh -c "rm -rf /volume/* /volume/..?* /volume/.[!.]* ; tar xvzf /backups/$volume-$backup.tgz -C /volume"
done done
``` ```

View File

@ -10,6 +10,7 @@ services:
- 8080:80 - 8080:80
volumes: volumes:
- akaunting-data:/var/www/html/storage - akaunting-data:/var/www/html/storage
- akaunting-modules:/var/www/html/modules
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- env/run.env - env/run.env
@ -34,4 +35,5 @@ services:
volumes: volumes:
akaunting-data: akaunting-data:
akaunting-modules:
akaunting-db: akaunting-db: