feat: 切换 PostgreSQL 并实现软删除功能
- 数据库从 SQLite 切换到 PostgreSQL,添加 Docker Compose 配置 - 使用 dotenv-cli 支持 .env 和 .env.local 环境变量加载 - 使用 Prisma $extends 实现底层自动软删除机制 - 新增用户恢复和查询已删除用户的 API 接口 - 更新文档和类型定义
This commit is contained in:
20
deploy/docker-compose.yml
Normal file
20
deploy/docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: seclusion-postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: dev
|
||||
POSTGRES_PASSWORD: dev
|
||||
POSTGRES_DB: seclusion
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U dev -d seclusion"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user