Migrated CI health test to new JSON. Refactored NGINX config
This commit is contained in:
@@ -20,22 +20,7 @@ http {
|
|||||||
'$status $body_bytes_sent "$http_referer" '
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log main;
|
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;
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
|
||||||
types_hash_bucket_size 128;
|
types_hash_bucket_size 128;
|
||||||
|
|||||||
@@ -25,13 +25,11 @@ server {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# NOT FOR PROD
|
# NOT FOR PROD vvv
|
||||||
location /docs {
|
location ~ ^/(docs|openapi.json)$ {
|
||||||
proxy_pass http://keywarden-api:8000;
|
|
||||||
}
|
|
||||||
location /openapi.json {
|
|
||||||
proxy_pass http://keywarden-api:8000;
|
proxy_pass http://keywarden-api:8000;
|
||||||
}
|
}
|
||||||
|
## REMOVE IN PRODUCTION BUILDS ^^^
|
||||||
|
|
||||||
location /api/v1/ {
|
location /api/v1/ {
|
||||||
proxy_pass http://keywarden-api:8000;
|
proxy_pass http://keywarden-api:8000;
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ from app.main import app
|
|||||||
|
|
||||||
def test_healthz():
|
def test_healthz():
|
||||||
client = TestClient(app)
|
client = TestClient(app)
|
||||||
r = client.get("/healthz")
|
r = client.get("/readyz")
|
||||||
assert r.status_code == 200
|
assert r.status_code == 200
|
||||||
assert r.json() == {"ok": True}
|
assert r.json() == {"status": "ok", "db": "up"}
|
||||||
Reference in New Issue
Block a user