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>
951 B
951 B
Deployment — Golden Rules
Containers
- Every runnable service that ships to prod must have a Dockerfile.
- Never use image tag
latestin production. - Always semantic version tags:
v0.1.0or git SHA.
Health
- Liveness:
GET /api/v1/healthzrequired. - When DB is required for traffic: add readiness endpoint (e.g.
/api/v1/readyz) that checks DB. - Alias names
/health/readiness/livenessmay 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.