diff --git a/vite.config.ts b/vite.config.ts index 1f317a4..6bc092a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,13 +8,19 @@ import { devtools } from "@tanstack/devtools-vite"; import { leanWorkerBundle } from "./vite-plugin-lean-worker-bundle"; export default defineConfig(() => { - const port = 3001; + // PORT/ALLOWED_HOST are documented self-host knobs (SELF_HOSTING_DOCKER.md, + // compose.yaml) but were never actually read here — every deployment was + // silently stuck on port 3001 and this one hardcoded domain, breaking any + // second instance on a different domain or port. Defaults keep existing + // deployments that don't set these working exactly as before. + const port = Number(process.env.PORT) || 3001; const showDevtools = false; const allowedHosts = [ "seo.thedomainnest.com", - ]; + process.env.ALLOWED_HOST, + ].filter((host): host is string => Boolean(host)); return { envPrefix: [