mirror of https://github.com/akaunting/docker.git
Persist modules folder content
This commit is contained in:
parent
fe5d12ee87
commit
75bb60bfb7
|
@ -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
|
||||||
```
|
```
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue