add first draft working docker setup

This commit is contained in:
JCEEE
2026-08-05 20:03:01 +01:00
parent fed2f32258
commit 0fb90de5a7
20 changed files with 318 additions and 38 deletions
+22
View File
@@ -11,6 +11,7 @@ server {
proxy_cache_bypass $http_upgrade;
}
# App's Hono proxy (/api/*).
location /api/ {
proxy_pass http://127.0.0.1:3456;
proxy_http_version 1.1;
@@ -19,4 +20,25 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Browser → internal PocketBase SDK (REST + realtime WebSocket). Only the
# /api subtree the PocketBase JS SDK uses. The admin UI (/_ and everything
# else under /pb/) is intentionally NOT proxied, keeping it internal.
location /pb/api/ {
proxy_pass http://127.0.0.1:8090/api/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
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_buffering off;
proxy_read_timeout 3600s;
}
# Everything else under /pb/ (including /pb/_ admin UI) → 404.
location /pb/ {
return 404;
}
}