-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathexample.yml
More file actions
34 lines (34 loc) · 723 Bytes
/
example.yml
File metadata and controls
34 lines (34 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
version: "2.2"
services:
db:
image: postgres:11-alpine
restart: always
environment:
POSTGRES_PASSWORD: 1234
volumes:
- postgres:/var/lib/postgresql/data
networks:
- internal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
backup:
image: 0xff/postgres-backup
restart: always
environment:
PGPASSWORD: 1234
CRONSCHEDULE: "21 22 * * *"
PGDUMPOPTIONS: "-F c -f /pg-backups/backup-$$(date +%u).dump"
depends_on:
db:
condition: service_healthy
networks:
- internal
volumes:
- ./pg-backups:/pg-backups
volumes:
postgres:
networks:
internal: