Files
sub2api/.ci
puro ci f431b2e2ff
Some checks failed
CI / test (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Security Scan / backend-security (push) Has been cancelled
Security Scan / frontend-security (push) Has been cancelled
ci: add Drone pipeline for ai.puro.im deployment
- .drone.yml: pnpm build frontend → go build backend → docker compose up
- .ci/Dockerfile: distroless:nonroot runtime image
- host state (/opt/sub2api/{config.yaml,compose,volumes}) stays untouched

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 12:26:37 +08:00
..

ai.puro.im CI artifacts

Drone CI (see .drone.yml) builds a statically-linked sub2api-linux binary and bakes it into this distroless image.

Host-side state (NOT in repo):

  • /opt/sub2api/docker-compose.yml — sub2api + sub2api-pg + sub2api-redis services + PG password
  • /opt/sub2api/app-data/config.yaml — wizard-generated runtime config
  • /opt/sub2api/{pg-data,redis-data,app-data,logs} — persistent volumes

Deploy flow:

  1. Drone builds frontend (pnpm) + backend (go, linux/amd64)
  2. CI copies backend/sub2api-linux + .ci/Dockerfile to /opt/sub2api/
  3. CI runs docker compose up -d --build sub2api — rebuilds only sub2api service, leaves PG/Redis untouched