How I ship
How I ship software, shown on my Cloud-Native Deployment Platform: from code to a local Kubernetes cluster, with AWS next.
The stations, in order
Code
Guarantees: Every change is linted and formatted the same way.
A FastAPI service with typed settings; Ruff checks lint and format.
In the code:
app/src/shortlink,app/pyproject.tomlChecks
Guarantees: Broken code is caught before it ships.
13 automated tests with pytest, including bad input and unknown links.
In the code:
app/tests/test_api.pyImage
Guarantees: The app runs the same everywhere, without root rights.
A multi-stage Docker image that runs as an unprivileged user.
In the code:
app/DockerfileDelivery
Guarantees: Every release is repeatable, and the database is migrated before the app starts.
Local Kubernetes (kind): two API replicas, PostgreSQL on its own volume, migrations as a Job.
In the code:
k8s/api-deployment.yaml,k8s/postgres.yaml,k8s/migrate-job.yamlMonitoring
Guarantees: Every request is counted and timed, so a slow or failing route shows up in the numbers.
Every request is counted and timed at /metrics.
In the code:
app/src/shortlink/metrics.py