g3w-suite / g3w-suite-docker

Run G3W-SUITE stack with docker-compose
https://g3w-suite.readthedocs.io/en/latest/docker.html
32 stars 34 forks source link

Allow to restore backups from "g3w-suite-demo-projects" #121

Closed Raruto closed 4 months ago

Raruto commented 5 months ago

Somehow related to: https://github.com/g3w-suite/g3w-admin/pull/881

Motivation

Avoid including default demo data (ie. /shared-volume/**) in production repos.

Before:

db-restore.sh backups were searched only in here

After:

db-restore.sh fallbacks to g3w-suite-demo-projects/backup folder:

How to test

## Backup g3w-suite ##

cd /path/to/g3w-suite-docker

make db-backup ID=demo-38 ENV=dev

## Update demo projects ##

git clone https://github.com/g3w-suite/g3w-suite-demo-projects.git ../g3w-suite-demo-projects

mv ./shared-volume/backup/demo-38 ../g3w-suite-demo-projects/backup

git -C ../g3w-suite-demo-projects/ commit -m "Add demo-38"
git -C ../g3w-suite-demo-projects/ push

## Restore demo (same as: "make db-restore ID=demo ENV=dev") ##

make db-reset ENV=dev

## Restore demo-38 ##

make db-restore ID=demo-38 ENV=dev