From a859138a50a7b7a53fd0b918c94cd7174689ff95 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sat, 18 Apr 2026 22:40:21 -0500 Subject: add docker deployment option --- docker/nginx.conf | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docker/nginx.conf (limited to 'docker') diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 0000000..49cd069 --- /dev/null +++ b/docker/nginx.conf @@ -0,0 +1,27 @@ +server { + listen 80; + root /usr/share/nginx/html; + index index.html; + + # SPA fallback — let React Router handle unknown paths + location / { + try_files $uri $uri/ /index.html; + } + + # Proxy Ollama's API through the same origin so the browser never has to + # make a cross-origin request and CORS is a non-issue. + # In the app's Settings panel, set the Ollama base URL to just: + # http:// (no port, no path suffix) + location /api/ { + proxy_pass http://ollama:11434/api/; + 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; + + # Ollama responses (especially streamed ones) can be large and slow; + # disable buffering so cancellation works promptly. + proxy_buffering off; + proxy_read_timeout 120s; + } +} -- cgit v1.2.3