8db45e478b
---ci---
phase: 5
milestone: v0.2
status: complete
escalation:
type: deploy
hook: deploy
resolution: auto
directive: milestone release publication post-approval
message: >-
The approved milestone release v0.2.5 published. Gitea release
retitled to note the recorded approval (decision 4721c2a) and
G-009 ratification. The deployed container at
https://research.coreci.dev already serves the release content
(the v0.2.5-uat staging was built from the same milestone HEAD
as the merged release) - no redeploy needed. DEPLOY-RECORD
ledger row added; v0.2 milestone cycle closed.
requirements:
covered: []
partial: []
---/ci---
CIAgent Release System — Docker Deployment
Codified release workflow: builds the ResearchX frontend as a production Next.js standalone image and deploys it to the Docker host via SSH. Designed for repeatable, parameterized future releases.
Components
| File | Purpose |
|---|---|
frontend/Dockerfile |
Multi-stage build: pnpm install → build → distroless-standalone runtime (node:22-alpine) |
.ciagent/release/deploy.sh |
One-command release: sync source → remote build → run container. Idempotent |
.ciagent/release/config.sh |
Non-secret parameters (host, port, image name). Secrets come ONLY from .ciagent/.env.secrets |
.ciagent/release/VERSIONING.md |
Release/version rules for future releases |
Secrets discipline
DEPLOY_HOST, DEPLOY_USER, DEPLOY_PASSWORD live ONLY in
.ciagent/.env.secrets (0600, gitignored). The deploy script reads
them from there — never from shell environment, never committed.
Non-secret host parameters (ports, paths) live in config.sh.
Usage
bash .ciagent/release/deploy.sh <version>
Examples:
bash .ciagent/release/deploy.sh v0.1.5 # deploy tagged version
bash .ciagent/release/deploy.sh v0.2.1 # future releases
What a release does
- Validate version tag exists locally (or fetch from origin)
- Verify gates:
pnpm typecheck && pnpm lint && pnpm test && pnpm build - Export a build bundle of the frontend source at that tag
- SSH (via
sshpass) to the Docker host with credentials from.env.secrets rsyncthe bundle up; remotedocker buildthe standalone image- Stop any previous
researchxcontainer; run the new one on the configured port - Health-check the container; report the URL
Rollback
ssh <host> docker stop researchx && docker start researchx-prev
The previous container is kept as researchx-prev (renamed on each
release) for one-step rollback.
Versioning rules
See VERSIONING.md. Tags follow the milestone patch line (v0.1.x for
milestone v0.1). The latest tag may also be pushed for convenience
but is never the source of truth.