mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-02 03:37:40 +02:00
update dokuwiki
This commit is contained in:
parent
74fb9284da
commit
3e0953fdcf
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||||
|
|
||||||
|
mkdir -p backups
|
||||||
|
|
||||||
ACTION=${1:?action is required}
|
ACTION=${1:?action is required}
|
||||||
FILENAME=${2:-dw-backup-$(date +%Y%m%d-%H%M%S).tar.gz}
|
FILENAME=${2:-dw-backup-$(date +%Y%m%d-%H%M%S).tar.gz}
|
||||||
CONTAINER=${3:-dokuwiki_dokuwiki_1}
|
CONTAINER=${3:-dokuwiki_dokuwiki_1}
|
||||||
@ -18,13 +20,13 @@ do_help() {
|
|||||||
|
|
||||||
do_backup() {
|
do_backup() {
|
||||||
echo "backup to $FILENAME"
|
echo "backup to $FILENAME"
|
||||||
docker run --rm --volumes-from $CONTAINER -v `pwd`:/backup alpine \
|
docker run --rm --volumes-from $CONTAINER -v `pwd`/backups:/backup alpine \
|
||||||
tar czf /backup/$FILENAME /var/www/html
|
tar czf /backup/$FILENAME /var/www/html
|
||||||
}
|
}
|
||||||
|
|
||||||
do_restore() {
|
do_restore() {
|
||||||
echo "restore from $FILENAME"
|
echo "restore from $FILENAME"
|
||||||
docker run --rm --volumes-from $CONTAINER -v `pwd`:/backup alpine \
|
docker run --rm --volumes-from $CONTAINER -v `pwd`/backups:/backup alpine \
|
||||||
tar xzf /backup/$FILENAME -C /
|
tar xzf /backup/$FILENAME -C /
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
dokuwiki:
|
dokuwiki:
|
||||||
image: vimagick/dokuwiki
|
image: vimagick/dokuwiki
|
||||||
ports:
|
ports:
|
||||||
- "8000:80"
|
- "8000:80"
|
||||||
restart: always
|
restart: always
|
||||||
|
Loading…
Reference in New Issue
Block a user