Skip to content

Commit 0b2ca70

Browse files
authored
Add PostgreSQL Docker Compose service
Add a local PostgreSQL 18 service with persistent storage and a readiness health check.
1 parent b4faffd commit 0b2ca70

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

compose.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
services:
2+
postgres:
3+
image: postgres:18-alpine
4+
environment:
5+
POSTGRES_DB: processdb
6+
POSTGRES_USER: processapp
7+
POSTGRES_PASSWORD: processapp
8+
ports:
9+
- "5432:5432"
10+
volumes:
11+
- processdb-data:/var/lib/postgresql/data
12+
healthcheck:
13+
test: ["CMD-SHELL", "pg_isready -U processapp -d processdb"]
14+
interval: 5s
15+
timeout: 5s
16+
retries: 10
17+
18+
volumes:
19+
processdb-data:

0 commit comments

Comments
 (0)