2.3 KiB
2.3 KiB
Infra — Familienarchiv
Overview
Infrastructure-as-code and deployment configurations for the Familienarchiv platform. Currently focused on Gitea CI/CD workflows.
Folder Structure
infra/
└── gitea/
└── workflows/
└── ci.yml # Gitea Actions CI pipeline
CI/CD Pipeline (gitea/workflows/ci.yml)
The CI pipeline runs on every push and pull request. It consists of three parallel jobs:
1. Unit & Component Tests (unit-tests)
- Container:
mcr.microsoft.com/playwright:v1.58.2-noble - Steps:
- Checkout code
- Cache and install
node_modules - Compile Paraglide i18n
- Run lint (Prettier + ESLint)
- Run Vitest unit + browser component tests
- Upload screenshots on failure
2. OCR Service Tests (ocr-tests)
- Runner:
ubuntu-latest - Steps:
- Setup Python 3.11
- Install test dependencies (
pyspellchecker,pytest,pytest-asyncio) - Run pure-logic tests (no ML stack required):
test_spell_check.pytest_confidence.pytest_sender_registry.py
3. Backend Unit Tests (backend-unit-tests)
- Runner:
ubuntu-latest - Env:
DOCKER_API_VERSION=1.43(for Testcontainers compatibility) - Steps:
- Setup Java 21 (Temurin)
- Cache Maven repository
- Run
./mvnw clean test
How to Run CI Locally
Frontend Tests (same as CI)
cd frontend
npm ci
npx @inlang/paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide
npm run lint
npm test
OCR Tests (same as CI)
cd ocr-service
pip install "pyspellchecker==0.9.0" pytest pytest-asyncio
python -m pytest test_spell_check.py test_confidence.py test_sender_registry.py -v
Backend Tests (same as CI)
cd backend
chmod +x mvnw
./mvnw clean test
Future Infrastructure
Potential additions to this folder:
- Terraform / OpenTofu configs for cloud deployment
- Ansible playbooks for bare-metal setup
- Kubernetes manifests (Helm charts)
- Monitoring stack configs (Prometheus, Grafana)
- Reverse proxy configs (Nginx, Traefik)
Notes
- The pipeline uses Gitea Actions (syntax-compatible with GitHub Actions).
- Docker API version pinning ensures compatibility with older Docker daemon versions.
- No deployment stage is defined yet — the CI stops at test verification.