diff options
| author | Christian Cleberg <[email protected]> | 2026-04-18 22:40:21 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-18 22:40:21 -0500 |
| commit | a859138a50a7b7a53fd0b918c94cd7174689ff95 (patch) | |
| tree | 2132fa7394403331a47809c46ad7e30a99d31c2a /docker | |
| parent | af6ac085443bf28a2229e8fc502a1cb290f03505 (diff) | |
| download | brand-bench-a859138a50a7b7a53fd0b918c94cd7174689ff95.tar.gz brand-bench-a859138a50a7b7a53fd0b918c94cd7174689ff95.tar.bz2 brand-bench-a859138a50a7b7a53fd0b918c94cd7174689ff95.zip | |
add docker deployment option
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/nginx.conf | 27 |
1 files changed, 27 insertions, 0 deletions
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://<your-server> (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; + } +} |
