-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (37 loc) · 930 Bytes
/
docker-compose.yml
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
35
36
37
38
39
40
version: '3.9'
services:
postgres_db:
image: postgres:14
restart: unless-stopped
container_name: postgres_db
volumes:
- ./postgres/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=mydatabase
- POSTGRES_USER=myuser
- POSTGRES_PASSWORD=${DUMPER_PASSWORD}
networks:
- db
database_dumper_postgres:
image: paolobasso/database_dumper:postgres-14
restart: unless-stopped
depends_on:
- postgres_db
container_name: database_dumper_postgres
volumes:
- ./postgres/dumps:/dumps
environment:
- PGID=1000
- PUID=1000
- DUMPER_DATABASE=mydatabase
- DUMPER_HOST=postgres_db
- DUMPER_USER=myuser
- DUMPER_PASSWORD=${DUMPER_PASSWORD}
- DUMPER_KEEP=7
- DUMPER_SCHEDULE=0 3 * * *
- DUMPER_HEALTHCHECKS_URL=${DUMPER_HEALTHCHECKS_URL}
networks:
- db
networks:
db:
driver: bridge