# Nginx site for the Notestack API on a Droplet that already runs other backends. # sudo cp /opt/notestack/deploy/nginx-notestack.conf /etc/nginx/sites-available/notestack # sudo ln -s /etc/nginx/sites-available/notestack /etc/nginx/sites-enabled/notestack # sudo nginx -t && sudo systemctl reload nginx # sudo certbot --nginx -d api.notestack.ai # adds HTTPS and the 443 server block # The API container listens on 127.0.0.1:8010 (API_PORT in deploy/.env.prod). server { listen 80; listen [::]:80; server_name api.notestack.ai; # Voice samples, PDFs and other uploads. client_max_body_size 220m; location / { proxy_pass http://127.0.0.1:8010; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Connection ""; # Job progress and chat are server sent events: stream them, do not buffer or time out early. proxy_buffering off; proxy_cache off; proxy_read_timeout 3600s; proxy_send_timeout 3600s; } }