chore: prepare portable postgres development environment

This commit is contained in:
que01 committed 2026-09-18 17:30:42 +08:00
1 parent 0e8b8e1591
commit f2687c502a
4 files changed
+54 -4

No files matched your search

+11 -4
View File
@@ -1,15 +1,22 @@
services:
postgres:
image: postgres:16-alpine
container_name: personal-brand-postgres
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: personal_brand
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-personal_brand}
ports:
- "5432:5432"
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- personal-brand-postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 12
start_period: 5s
volumes:
personal-brand-postgres: