2022-02-22 07:49:24 +01:00
|
|
|
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:
|
2023-09-02 15:17:46 +02:00
|
|
|
POSTGRES_PASSWORD: 1FHJMSwt0yhIN1zS7I4DilGUhThBKq0x
|
|
|
|
POSTGRES_USER: test
|
|
|
|
POSTGRES_DB: test
|
2022-02-22 07:49:24 +01:00
|
|
|
|
|
|
|
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
|
2023-09-02 15:17:46 +02:00
|
|
|
- ${LOCAL_DIR:-./local}:/archive
|
2022-02-22 07:49:24 +01:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
postgres_data:
|