mirror of
https://github.com/Dvorinka/Bookra.git
synced 2026-10-28 15:51:15 +00:00
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>
This commit is contained in:
1 parent
2039669e2c
commit
f2f7439050
93 files changed
+6987
-69060
No files matched your search
+10
-27
@@ -3,10 +3,8 @@
|
||||
## Current shape
|
||||
|
||||
- CI runs in GitHub Actions from `.github/workflows/ci.yml`.
|
||||
- Frontend CD should stay on Vercel Git deployments.
|
||||
- Backend and auth-service can stay on Railway Git autodeploys, or consume GHCR images built by CI.
|
||||
|
||||
This keeps Vercel/Railway Git deployment simple while still producing immutable backend images on every production push.
|
||||
- Frontend CD stays on Vercel Git deployments.
|
||||
- Backend stays on Railway Git autodeploys, or consumes the GHCR image built by CI.
|
||||
|
||||
## CI coverage
|
||||
|
||||
@@ -14,11 +12,10 @@ 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. auth-service `go test` + `go build`
|
||||
4. Docker image builds for `apps/backend` and `apps/auth-service`
|
||||
5. GHCR publishing on push to `main` and manual workflow runs
|
||||
3. Docker image build for `apps/backend`
|
||||
4. GHCR publishing on push to `main` and manual workflow runs
|
||||
|
||||
Go is pinned to `1.26.2`, the latest stable release at time of setup.
|
||||
Go is pinned via `apps/backend/go.mod`.
|
||||
|
||||
## Platform CD wiring
|
||||
|
||||
@@ -32,39 +29,31 @@ Go is pinned to `1.26.2`, the latest stable release at time of setup.
|
||||
|
||||
### Railway
|
||||
|
||||
Create two Railway services from this repo:
|
||||
Create one Railway service from this repo:
|
||||
|
||||
- backend root directory: `apps/backend`
|
||||
- auth-service root directory: `apps/auth-service`
|
||||
- code-based config: [apps/backend/railway.json](/home/tdvorak/Desktop/PROG+HTML/Bookra/apps/backend/railway.json:1)
|
||||
|
||||
Both services now have code-based Railway config:
|
||||
|
||||
- [apps/backend/railway.json](/home/tdvorak/Desktop/PROG+HTML/Bookra/apps/backend/railway.json:1)
|
||||
- [apps/auth-service/railway.json](/home/tdvorak/Desktop/PROG+HTML/Bookra/apps/auth-service/railway.json:1)
|
||||
|
||||
Enable for each service:
|
||||
Enable:
|
||||
|
||||
- GitHub Autodeploys
|
||||
- Wait for CI
|
||||
|
||||
Health checks:
|
||||
Health check:
|
||||
|
||||
- backend: `/healthz`
|
||||
- auth-service: `/health`
|
||||
|
||||
Published images:
|
||||
|
||||
- `ghcr.io/<owner>/bookra-backend:<sha|branch|latest>`
|
||||
- `ghcr.io/<owner>/bookra-auth-service:<sha|branch|latest>`
|
||||
|
||||
Use SHA tags for production rollouts. `latest` is emitted only from the default branch.
|
||||
|
||||
## Local mirror of CI
|
||||
|
||||
```bash
|
||||
PATH=/usr/local/go/bin:$PATH npm run verify
|
||||
npm run verify
|
||||
docker build -t bookra-backend-ci ./apps/backend
|
||||
docker build -t bookra-auth-ci ./apps/auth-service
|
||||
```
|
||||
|
||||
## Low-RAM act checks
|
||||
@@ -81,9 +70,3 @@ act push -W .github/workflows/ci.yml -j go \
|
||||
--concurrent-jobs 1 -b \
|
||||
--container-options='--memory=3g --cpus=2'
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- `frontend` job was executed successfully with `act`.
|
||||
- `go` job was executed successfully with `act` for `apps/backend`.
|
||||
- Dockerfiles were validated with direct `docker build`, which is cheaper than running full Docker-action matrix through `act`.
|
||||
Reference in new issue
Block a user