Add deployment pipeline, Dockerfile, Nomad spec and tests
Some checks failed
Build and Deploy PunktFri / build-and-deploy (push) Has been cancelled

- Dockerfile: python:3.12-slim + gunicorn, dynamic port, BUILD_VERSION args
- punktfri.nomad: Traefik routing for punktfri.i80.dk, host volume for SQLite
- .gitea/workflows/deploy.yml: build/push to Harbor, deploy to Nomad
- Makefile: install/run/test/build targets
- tests/test_app.py: 9 pytest tests covering all routes and validation
- requirements.txt: add gunicorn
- requirements-dev.txt: pytest
- app.py: health endpoint returns version/commit info
This commit is contained in:
Henrik Jess Nielsen
2026-04-26 18:32:32 +02:00
parent 7fe85dfe2c
commit f098c65ca0
9 changed files with 329 additions and 1 deletions

6
app.py
View File

@@ -128,7 +128,11 @@ def admin():
@app.route("/health")
def health():
return {"status": "ok"}, 200
return {
"status": "ok",
"version": os.environ.get("BUILD_VERSION", "dev"),
"commit": os.environ.get("GIT_COMMIT", "unknown"),
}, 200
init_db()