feat(infra): PostgreSQL16 compose(宿主5434)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-10-20 18:10:26 +08:00
parent b538c21e78
commit cf9a34959c
2 changed files with 20 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# 复制为 .env 使用;.env 已被 gitignore
DATABASE_URL=postgres://siteforge:siteforge_dev@localhost:5434/siteforge
+18
View File
@@ -0,0 +1,18 @@
# infra/docker-compose.yml
services:
postgres:
image: postgres:16
container_name: sf-postgres
environment:
POSTGRES_USER: siteforge
POSTGRES_PASSWORD: siteforge_dev
POSTGRES_DB: siteforge
ports: ["5434:5432"]
volumes: [sf_pgdata:/var/lib/postgresql/data]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U siteforge"]
interval: 5s
timeout: 3s
retries: 10
volumes:
sf_pgdata: