docs: update documentation with CI image info

This commit is contained in:
2026-03-31 22:12:42 -07:00
parent b686c3673e
commit 941d857feb
3 changed files with 58 additions and 0 deletions
+28
View File
@@ -373,6 +373,31 @@ The application uses Gitea Actions for continuous integration and deployment:
- Docker image building and testing
- Registry push and deployment
4. **CI Image Builder** (`.gitea/workflows/ci-image-builder.yml`): Runs when dependencies change
- Automatically builds CI runner image with all dependencies pre-installed
- Triggered by changes to `package.json`, `package-lock.json`, or `Dockerfile.ci`
### CI Runner Image
To avoid installing dependencies on every workflow run, we use a pre-built CI runner image:
**Dockerfile.ci** - Contains:
- Node.js 20 Alpine
- All npm dependencies pre-installed
- Prisma client pre-generated
- System tools (bash, git, python, make, g++)
**Automatic Rebuilding:**
- The CI image is automatically rebuilt when `package.json` or `package-lock.json` changes
- Images are tagged with commit SHA for traceability
- Falls back to `node:20-alpine` if custom image is not available
**Manual Build:**
```bash
docker build -f Dockerfile.ci -t euchre-camp-ci:latest .
docker run --rm euchre-camp-ci:latest node --version
```
### Database Strategy for CI
- **CI Tests**: SQLite database (fast, no server required)
- **Production**: PostgreSQL (production-like environment)
@@ -385,6 +410,9 @@ npm run test:run
# Run acceptance tests with SQLite
DATABASE_PROVIDER=sqlite DATABASE_URL=file:./prisma/ci.db npm run test:acceptance
# Run tests in CI container (if built)
docker run --rm -v $(pwd):/app -w /app euchre-camp-ci:latest npm run test:run
```
## Docker Deployment