Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
postgres:
image: postgres:18-alpine
environment:
POSTGRES_DB: processdb
POSTGRES_USER: processapp
POSTGRES_PASSWORD: processapp
Comment on lines +4 to +7
ports:
- "5432:5432"
volumes:
- processdb-data:/var/lib/postgresql/data

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mount the Postgres 18 volume at the new data root

Because this service uses postgres:18-alpine, the official image docs place the live PGDATA under /var/lib/postgresql/18/docker and recommend targeting the volume at /var/lib/postgresql; mounting the named volume at the old /var/lib/postgresql/data path can leave the actual database files in an anonymous parent volume, so data disappears after a docker compose down/container recreation even though processdb-data exists. Please mount processdb-data at /var/lib/postgresql (or explicitly set PGDATA inside the mounted path) instead.

Useful? React with 👍 / 👎.

healthcheck:
test: ["CMD-SHELL", "pg_isready -U processapp -d processdb"]
interval: 5s
timeout: 5s
retries: 10
Comment on lines +12 to +16

volumes:
processdb-data: