-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
65 lines (58 loc) · 1.44 KB
/
Copy pathcompose.yml
File metadata and controls
65 lines (58 loc) · 1.44 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
services:
postgres:
image: docker.io/postgres:14
container_name: postgres
restart: unless-stopped
ports:
- target: 5432
published: 5432
mode: host
volumes:
# - /home/marc/backup:/backup
- /srv/postgres:/var/lib/postgresql/data
- ../../data/postgres/initdb.d:/initdb.d
- ../../data/postgres/certs:/var/lib/postgresql/certs
env_file: .env
command: 'postgres
-c log_statement=all
-c log_destination=stderr
'
networks:
- postgres
healthcheck:
test:
- CMD-SHELL
- pg_isready -q || exit 1
interval: 10s
timeout: 3s
retries: 3
pgagent:
image: docker.io/chiavegatto/postgres-pgagent
entrypoint: /bin/sh -c "/tmp/wait-for-it.sh postgres:5432 --timeout=30 && psql
-U postgres -h postgres -p 5432 -d postgres -c 'CREATE EXTENSION IF NOT EXISTS
pgagent;' && pgagent -f hostaddr=postgres dbname=postgres user=postgres port=5432"
environment:
TIMEZONE: Europe/Paris
env_file: .env
networks:
- postgres
backup:
image: docker.io/kartoza/pg-backup:14-3.1
env_file: .env
networks:
- postgres
volumes:
- /srv/pg-backup:/backups
pgbackups:
image: docker.io/prodrigestivill/postgres-backup-local
restart: unless-stopped
volumes:
- /srv/pgbackups:/backups
networks:
- postgres
env_file: .env
volumes:
postgres: null
networks:
postgres:
external: true