JanetFrontEnd/nginx.default.conf

34 lines
659 B
Plaintext

# nginx configuration for Docker
upstream api_server {
server janet-backend:5000;
}
server {
listen 80 default_server;
root /usr/share/nginx/html;
index index.html;
error_page 500 502 503 504 /50x.html;
location / {
try_files $uri $uri/ =404;
add_header Cache-Control "no-cache";
}
location /health {
access_log off;
add_header 'Content-Type' 'application/json';
return 200 '{"status":"UP"}';
}
location /static {
expires 1y;
add_header Cache-Control "public";
}
location /api {
proxy_pass https://api_server;
}
}