worker_processes  1;

events {
    worker_connections  1024;
}

pid nginx.pid;
error_log stderr;
daemon off;

http {
    default_type  application/octet-stream;

    sendfile        on;
    server_tokens off;
    
    access_log nginx_host.access.log;
    client_body_temp_path client_body;
    fastcgi_temp_path fastcgi_temp;
    proxy_temp_path proxy_temp;
    scgi_temp_path scgi_temp;
    uwsgi_temp_path uwsgi_temp;

    proxy_buffering off;    

    server {
        listen       3000;
        server_name  localhost;

        location / {
                proxy_pass http://localhost:4000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }

        location /api/v1/depot/ {
                proxy_pass http://localhost:5000;
                proxy_read_timeout 300s;
                proxy_connect_timeout 75s;
        }
    }
}
