enable dev|prod envs with simpler env vars system
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Runtime env for the proxy. Same dev/prod split as the frontend: dev connects
|
||||
// to the dev machine's PocketBase at SERVER_IP, prod connects to the
|
||||
// container-internal loopback PB. Ports come from config.ts (single source).
|
||||
//
|
||||
// Env loading: dev uses `tsx --env-file=../.env` (see package.json) like vite
|
||||
// does for the frontend; prod (docker) injects env via compose and has no .env,
|
||||
// so SERVER_IP is unset → loopback below.
|
||||
const SERVER_IP = process.env.SERVER_IP;
|
||||
|
||||
export const PB_ENDPOINT = SERVER_IP
|
||||
? `http://${SERVER_IP}:8090`
|
||||
: `http://127.0.0.1:8090`;
|
||||
export const PB_EMAIL = process.env.PB_EMAIL || "debug@famchamp.dev";
|
||||
export const PB_PASSWORD = process.env.PB_PASSWORD || "debug123";
|
||||
Reference in New Issue
Block a user