Migrated CI health test to new JSON. Refactored NGINX config
Some checks failed
CI / Lint & Format (push) Successful in 3s
CI / Tests (Pytest + Alembic + Postgres) (push) Failing after 4m44s
CI / Docker Build (push) Has been skipped

This commit is contained in:
2025-09-30 12:39:49 +01:00
parent 7054ba7547
commit ef947d9888
3 changed files with 6 additions and 23 deletions

View File

@@ -20,22 +20,7 @@ http {
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
server_tokens off;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
client_body_timeout 15;
gzip on;
gzip_vary on;
gzip_min_length 1k;
client_max_body_size 10G;
proxy_request_buffering off;
access_log /var/log/nginx/access.log main;
include /etc/nginx/conf.d/*.conf;
types_hash_bucket_size 128;

View File

@@ -25,13 +25,11 @@ server {
}
# NOT FOR PROD
location /docs {
proxy_pass http://keywarden-api:8000;
}
location /openapi.json {
# NOT FOR PROD vvv
location ~ ^/(docs|openapi.json)$ {
proxy_pass http://keywarden-api:8000;
}
## REMOVE IN PRODUCTION BUILDS ^^^
location /api/v1/ {
proxy_pass http://keywarden-api:8000;

View File

@@ -8,6 +8,6 @@ from app.main import app
def test_healthz():
client = TestClient(app)
r = client.get("/healthz")
r = client.get("/readyz")
assert r.status_code == 200
assert r.json() == {"ok": True}
assert r.json() == {"status": "ok", "db": "up"}