[10] Deployment, CI, and production hardening #45

Open
opened 2026-06-14 05:25:05 +02:00 by dernbu · 0 comments
Owner

Objective

Make the complete product reproducibly testable and continuously deployable to staging and production.

After this slice, merges should update the appropriate long-running Docker Compose environment and CI should prove the product works without contacting live sources.

Dependencies

Depends on #44.

Scope

  • Add Forgejo Actions CI for Python, TypeScript, database migrations, Docker image builds, and end-to-end fixture-backed checks.
  • Add complete mocked LawNet and eLitigation fixtures for CI.
  • Validate PostgreSQL/Flyway migrations and generated database type drift.
  • Run Compose smoke or end-to-end tests against fixture-backed services.
  • Verify restart behavior, migration ordering, networking, and health checks.
  • Add deployment workflow for the self-hosted Forgejo runner.
  • Deploy staging from merges to dev and production from merges to main.
  • Render separate staging and production env files from Forgejo secrets without printing secret values.
  • Use separate Compose project names, networks, and PostgreSQL volumes for staging and production.
  • Expose only web to the host, using port 3411 for staging and 3410 for production.
  • Run Flyway migrations through the Compose deployment path.
  • Document deployment commands, expected secrets, branch behavior, ports, rollback/log inspection, and human runner setup.

Out of scope

  • Caddy TLS termination configuration.
  • Backup service implementation.
  • Live source access in CI.

Done when

  • CI passes without contacting live sources.
  • A clean Compose deployment reaches a healthy state.
  • A merge to dev deploys staging on host port 3411.
  • A merge to main deploys production on host port 3410.
  • Staging and production use separate env values, Compose projects, networks, and database volumes.
  • Flyway migrations run as part of deployment.
  • Deployment and manual recovery steps are documented.
## Objective Make the complete product reproducibly testable and continuously deployable to staging and production. After this slice, merges should update the appropriate long-running Docker Compose environment and CI should prove the product works without contacting live sources. ## Dependencies Depends on #44. ## Scope - Add Forgejo Actions CI for Python, TypeScript, database migrations, Docker image builds, and end-to-end fixture-backed checks. - Add complete mocked LawNet and eLitigation fixtures for CI. - Validate PostgreSQL/Flyway migrations and generated database type drift. - Run Compose smoke or end-to-end tests against fixture-backed services. - Verify restart behavior, migration ordering, networking, and health checks. - Add deployment workflow for the self-hosted Forgejo runner. - Deploy staging from merges to `dev` and production from merges to `main`. - Render separate staging and production env files from Forgejo secrets without printing secret values. - Use separate Compose project names, networks, and PostgreSQL volumes for staging and production. - Expose only web to the host, using port `3411` for staging and `3410` for production. - Run Flyway migrations through the Compose deployment path. - Document deployment commands, expected secrets, branch behavior, ports, rollback/log inspection, and human runner setup. ## Out of scope - Caddy TLS termination configuration. - Backup service implementation. - Live source access in CI. ## Done when - CI passes without contacting live sources. - A clean Compose deployment reaches a healthy state. - A merge to `dev` deploys staging on host port `3411`. - A merge to `main` deploys production on host port `3410`. - Staging and production use separate env values, Compose projects, networks, and database volumes. - Flyway migrations run as part of deployment. - Deployment and manual recovery steps are documented.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dernbu/lawnet-scraper#45
No description provided.