mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-15 10:40:27 +01:00
Frederik Ring
3ded77448c
* Update targz library to include potential ownership fix * Move archive logic to main repo * Remove assertions for debugging * Use relative path in assertion * Strip local part from archive location * Log when extracting in tests * Fix trimming of prfix * Add license info to archive.go file * Undo change in test assertion * Add test checking for preserved file ownership * use same postgres version in tests * Wrap errors when archiving, handle deletion at script layer
28 lines
640 B
YAML
28 lines
640 B
YAML
version: '3'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:14-alpine
|
|
restart: unless-stopped
|
|
labels:
|
|
- docker-volume-backup.stop-during-backup=true
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_PASSWORD=1FHJMSwt0yhIN1zS7I4DilGUhThBKq0x
|
|
- POSTGRES_USER=test
|
|
- POSTGRES_DB=test
|
|
|
|
backup:
|
|
image: offen/docker-volume-backup:${TEST_VERSION}
|
|
restart: always
|
|
environment:
|
|
BACKUP_FILENAME: backup.tar.gz
|
|
volumes:
|
|
- postgres_data:/backup/postgres:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./local:/archive
|
|
|
|
volumes:
|
|
postgres_data:
|