06 — Infrastructure
Infrastructure
From commit to browser: the exact path of a production release, and the choices that make it reversible.
Production architecture
-
Edge
- Caddy: automatic TLS, HTTP/2 and HTTP/3
- 301 redirect from / to /fr/
- Security headers and compression
-
Static site
- Astro 5, immutable build
- nginx: files and 404 page
- No application port exposed
-
API
- Flask + Gunicorn
- Validation, honeypot, rate limiting
- SMTP delivery and JSON responses
-
Data and monitoring
- PostgreSQL for messages
- Backups and versioned migrations
- Uptime Kuma and logs
Deployment pipeline
Every step is automated; a red CI blocks the production release.
- 01 CI
Verify
Lint, format, types and tests on every pull request.
- ESLint
- Prettier
- astro check
- Ruff
- Pytest
- 02 CI
Build
Astro build and multi-stage Docker images, with no secret in the final layer.
- Astro
- Docker
- Buildx
- 03 CI
Publish
SHA-tagged images pushed to the GitHub registry, never overwritten.
- ghcr.io
- SHA
- SBOM
- 04 CD
Deploy
Key-based SSH, compose pull, restart and healthcheck before validation.
- SSH
- Compose
- Healthcheck
- 05 CD
Observe
Uptime, logs and rollback to the previous tag in one command.
- Uptime Kuma
- Logs
- Rollback
Full stack
- Astro 5
- Tailwind CSS 4
- TypeScript
- Flask
- PostgreSQL
- Docker
- Caddy
- GitHub Actions
- Uptime Kuma