Files
digital-psychology/.ai/deployment.md
T
jackyu66gitandCursor 2fb1dfee14 chore: seal Design Vision v1 and monorepo scaffold
Archive the differentiated YuXinGu product docs, AI engineering system,
design contract, and Go/Vue scaffold. Next execution prioritizes Cece-parity
over early innovation (see .ai/product/STRATEGY.md).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:00:44 +08:00

951 B

Deployment — Golden Rules

Containers

  • Every runnable service that ships to prod must have a Dockerfile.
  • Never use image tag latest in production.
  • Always semantic version tags: v0.1.0 or git SHA.

Health

  • Liveness: GET /api/v1/healthz required.
  • When DB is required for traffic: add readiness endpoint (e.g. /api/v1/readyz) that checks DB.
  • Alias names /health /readiness /liveness may map to the above; keep one canonical path documented in OpenAPI.

Config

  • Secrets via env only. Commit .env.example, never .env.
  • Required: APP_ENV, HTTP_ADDR, DATABASE_URL.

CI

  • No manual prod deploy as the happy path — CI builds and tags.
  • Minimum gates: go test ./... (api), npm run build:h5.

Local

docker compose -f deploy/docker-compose.yml up -d
cd apps/api && go run ./cmd/server
npm run dev:h5

If Go module download times out in CN: export GOPROXY=https://goproxy.cn,direct.