-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (39 loc) · 947 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (39 loc) · 947 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
35
36
37
38
39
40
# https://docs.docker.com/compose/compose-file
name: postgresql-modern
services:
postgres:
image: postgres:18-bookworm
# image: rbehzadan/postgres:17.6
restart: unless-stopped
environment:
- POSTGRES_HOST=postgresql-modern
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgresql-modern
ports:
- "5432:5432"
volumes:
- ~/dbdata/postgresql/postgresql-modern:/var/lib/postgresql
- ./data/:/data/
networks:
- postgres-network
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 3
window: 60s
resources:
limits:
cpus: 2
memory: 1024M
reservations:
cpus: 1
memory: 256M
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 3s
timeout: 2s
retries: 10
networks:
postgres-network: