Files
Bookra/docs/ci-cd.md
T
Tomas DvorakandDevin f2f7439050 refactor(db): replace sqlc with handwritten pgx repos
- Finish Paddle-to-Stripe billing migration; drop paddle/stripe libs
- Renumber migrations; add 00012 memberships+manage_token,
  00013 location_type_capacity
- Add tests: admin, auth, bookings customer service
- Remove graphify-out artifacts and stale env files

Authored By: TDvorak <[email protected]>

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-17 20:21:34 +02:00

73 lines
1.9 KiB
Markdown

# Bookra CI/CD
## Current shape
- CI runs in GitHub Actions from `.github/workflows/ci.yml`.
- Frontend CD stays on Vercel Git deployments.
- Backend stays on Railway Git autodeploys, or consumes the GHCR image built by CI.
## CI coverage
Every pull request, push to `main`, and manual workflow run executes:
1. frontend install, API client generation, typecheck, and production build
2. backend `go test` + `go build`
3. Docker image build for `apps/backend`
4. GHCR publishing on push to `main` and manual workflow runs
Go is pinned via `apps/backend/go.mod`.
## Platform CD wiring
### Vercel
- Create Vercel project for frontend.
- Set project root directory to `apps/frontend`.
- Keep Git-based deployments enabled for `main`.
- Let Vercel keep monorepo auto-detection enabled. Vercel documents monorepo root-directory support and automatic per-project Git deployments.
- Only override build settings if auto-detection is wrong during first import.
### Railway
Create one Railway service from this repo:
- backend root directory: `apps/backend`
- code-based config: [apps/backend/railway.json](/home/tdvorak/Desktop/PROG+HTML/Bookra/apps/backend/railway.json:1)
Enable:
- GitHub Autodeploys
- Wait for CI
Health check:
- backend: `/healthz`
Published images:
- `ghcr.io/<owner>/bookra-backend:<sha|branch|latest>`
Use SHA tags for production rollouts. `latest` is emitted only from the default branch.
## Local mirror of CI
```bash
npm run verify
docker build -t bookra-backend-ci ./apps/backend
```
## Low-RAM act checks
For local GitHub Actions validation on a memory-constrained machine, run one job at a time:
```bash
act push -W .github/workflows/ci.yml -j frontend \
--concurrent-jobs 1 -b \
--container-options='--memory=3g --cpus=2'
act push -W .github/workflows/ci.yml -j go \
--matrix app:apps/backend \
--concurrent-jobs 1 -b \
--container-options='--memory=3g --cpus=2'
```