chore(db): add local PostgreSQL Compose setup

This commit is contained in:
2026-09-28 14:25:47 +08:00
parent c33857ffac
commit 99d4a85ece
5 changed files with 50 additions and 12 deletions
+25
View File
@@ -0,0 +1,25 @@
services:
db:
image: registry1.fw.ac.cn/docker.io/postgres:alpine
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Aa110011
POSTGRES_DB: fluxent
ports:
- "127.0.0.1:5432:5432"
volumes:
- fluxent-postgres-data:/var/lib/postgresql
healthcheck:
test:
[
"CMD-SHELL",
'pg_isready -U "$${POSTGRES_USER}" -d "$${POSTGRES_DB}" -h 127.0.0.1 -p 5432',
]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
volumes:
fluxent-postgres-data: