0512428601
adapter-auto doesn't produce a runnable standalone server when it can't detect a supported hosting platform (Vercel/Netlify/Cloudflare/etc.) — this is a self-hosted app with no such platform, so builds were silently missing a real server output. Swapped to adapter-node, which builds to build/index.js: a persistent Node server that reads PORT/HOST/ORIGIN at runtime, exactly what a reverse proxy needs to point a domain at. Added a README section covering the full path: building/running both apps as plain Node processes, the env vars each needs, and the Nginx Proxy Manager side (proxy host + Custom Locations for /api and /media under a single-domain, path-routed setup, or a simpler two-domain alternative). Verified live: the adapter-node build actually serves pages and correctly picks up ADMIN_PANEL_ENABLED via `node --env-file=.env build/index.js` (SvelteKit's $env/dynamic/private reads process.env directly in production, unlike the vite-dev-time gap from the previous fix).
19 lines
992 B
Bash
19 lines
992 B
Bash
# Where the frontend talks to the backend (real or mock). Also settable at runtime
|
|
# via the connection setup screen, which saves to this browser's localStorage and
|
|
# takes priority over this build-time value — see src/lib/config.ts.
|
|
VITE_BACKEND_URL=http://localhost:4000
|
|
|
|
# The admin panel (cog icon in the masthead, and the /admin/* pages themselves) is
|
|
# disabled by default on every deployment. Set this to "true" to turn it on for a
|
|
# given deployment. This only controls whether the admin UI renders at all — the
|
|
# backend's per-launch API key (printed to its console on startup) is what actually
|
|
# protects every /api/admin/* request regardless of this setting.
|
|
ADMIN_PANEL_ENABLED=false
|
|
|
|
# Only used when actually running the production build (`node build/index.js`,
|
|
# e.g. behind Nginx Proxy Manager or another reverse proxy) — vite dev/preview
|
|
# ignore these. See README.md "Deploying behind a reverse proxy".
|
|
# PORT=3000
|
|
# HOST=0.0.0.0
|
|
# ORIGIN=https://homefeed.example.com
|