feat(infra): PostgreSQL16 compose(宿主5434)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
# 复制为 .env 使用;.env 已被 gitignore
|
||||||
|
DATABASE_URL=postgres://siteforge:siteforge_dev@localhost:5434/siteforge
|
||||||
@@ -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:
|
||||||
Reference in New Issue
Block a user