JanetFrontEnd/nginx.default.conf

38 lines
798 B
Plaintext
Raw Normal View History

2023-04-07 17:36:38 +02:00
# nginx configuration for Docker
upstream api_server {
2023-04-09 20:04:56 +02:00
server janet-backend:5000;
2023-04-07 17:36:38 +02:00
}
server {
listen 80 default_server;
root /usr/share/nginx/html;
index index.html;
error_page 500 502 503 504 /50x.html;
location / {
2023-04-18 03:30:50 +02:00
try_files $uri $uri/ /index.html;
2023-04-07 17:36:38 +02:00
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 {
2023-04-09 20:08:57 +02:00
proxy_pass http://api_server;
2023-07-31 13:17:30 +02:00
proxy_read_timeout 36000;
proxy_connect_timeout 36000;
proxy_send_timeout 36000;
send_timeout 36000;
2023-04-07 17:36:38 +02:00
}
}