forked from imbytecat/fullstack-starter
830c908712
- orpc.ts: 改为纯 createTanstackQueryUtils,不再依赖 experimental_ API - 抽出 src/client/queries/todo.ts 的 useInvalidateTodos,避免 query key 散落页面 - shutdown: setTimeout 内 db.$client.end() 失败也走 process.exit - 删除 db/index.ts 未被使用的 DB 类型导出 - 删除 env.ts 未被消费的 VITE_APP_TITLE,根 title 改为 package.json name - 清理 routes/index.tsx 的 JSX 区段注释、compose.yaml 注释掉的端口块、robots.txt URL 注释
40 lines
850 B
YAML
40 lines
850 B
YAML
services:
|
|
migrate:
|
|
build: .
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
- DATABASE_URL=postgres://postgres:postgres@db:5432/postgres
|
|
command: ["./server", "migrate"]
|
|
restart: "no"
|
|
|
|
app:
|
|
build: .
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- DATABASE_URL=postgres://postgres:postgres@db:5432/postgres
|
|
|
|
db:
|
|
image: postgres:18-alpine
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
healthcheck:
|
|
test: [ "CMD", "pg_isready", "-U", "postgres" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_data:
|