-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.postgres.yaml
More file actions
55 lines (53 loc) · 1.13 KB
/
compose.postgres.yaml
File metadata and controls
55 lines (53 loc) · 1.13 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
services:
postgres:
image: postgres:17
container_name: portal_db
command: postgres # -c 'log_statement=all'
env_file:
- .env
volumes:
- portal_db:/var/lib/postgresql/data
networks:
- portal_private
restart: unless-stopped
profiles:
- dev
- prod
postgres-maintenance:
image: node:22
container_name: portal_db_maintenance
command: sleep 10m
env_file:
- .env
networks:
- portal_private
volumes:
- ./Makefile:/data/Makefile
- ./db:/data/db
depends_on:
- postgres
restart: no
profiles:
- dev
- prod
postgres-backup:
image: prodrigestivill/postgres-backup-local
container_name: portal_db_backup
env_file:
- .env
environment:
POSTGRES_EXTRA_OPTS: -Z1 --schema=public --blobs
SCHEDULE: "*/15 * * * *"
BACKUP_ON_START: TRUE
BACKUP_KEEP_DAYS: 7
BACKUP_KEEP_WEEKS: 4
BACKUP_KEEP_MONTHS: 6
networks:
- portal_private
volumes:
- portal_db_backup:/backups
depends_on:
- postgres
restart: unless-stopped
profiles:
- prod