forked from farhoodlabs/paperclip
fix(server): respect externally set PAPERCLIP_API_URL env var
Previously the server unconditionally overwrote PAPERCLIP_API_URL on startup, clobbering any value set externally (e.g., via Kubernetes ConfigMap). Now only sets the default if the env var is not already set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -553,7 +553,9 @@ export async function startServer(): Promise<StartedServer> {
|
|||||||
: runtimeListenHost;
|
: runtimeListenHost;
|
||||||
process.env.PAPERCLIP_LISTEN_HOST = runtimeListenHost;
|
process.env.PAPERCLIP_LISTEN_HOST = runtimeListenHost;
|
||||||
process.env.PAPERCLIP_LISTEN_PORT = String(listenPort);
|
process.env.PAPERCLIP_LISTEN_PORT = String(listenPort);
|
||||||
process.env.PAPERCLIP_API_URL = `http://${runtimeApiHost}:${listenPort}`;
|
if (!process.env.PAPERCLIP_API_URL) {
|
||||||
|
process.env.PAPERCLIP_API_URL = `http://${runtimeApiHost}:${listenPort}`;
|
||||||
|
}
|
||||||
|
|
||||||
setupLiveEventsWebSocketServer(server, db as any, {
|
setupLiveEventsWebSocketServer(server, db as any, {
|
||||||
deploymentMode: config.deploymentMode,
|
deploymentMode: config.deploymentMode,
|
||||||
|
|||||||
Reference in New Issue
Block a user