mirror of https://github.com/akaunting/docker.git
Merge pull request #23 from MohammedAl-Mahdawi/persist-modules-folder
Persist modules folder content
This commit is contained in:
commit
e1df023d52
|
@ -44,7 +44,7 @@ You could use something like the following commands to make backups for your dep
|
|||
|
||||
```shell
|
||||
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 ./
|
||||
done
|
||||
```
|
||||
|
@ -53,7 +53,7 @@ In order to restore those backups, you would run something like:
|
|||
|
||||
```shell
|
||||
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"
|
||||
done
|
||||
```
|
||||
|
|
|
@ -10,6 +10,7 @@ services:
|
|||
- 8080:80
|
||||
volumes:
|
||||
- akaunting-data:/var/www/html/storage
|
||||
- akaunting-modules:/var/www/html/modules
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- env/run.env
|
||||
|
@ -34,4 +35,5 @@ services:
|
|||
|
||||
volumes:
|
||||
akaunting-data:
|
||||
akaunting-modules:
|
||||
akaunting-db:
|
||||
|
|
Loading…
Reference in New Issue