Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Fix: Serve frontend with binary

Daniel Hougaard754404d90585
diff --git a/backend/src/server/app.ts b/backend/src/server/app.ts
index 863162c2b7..cb92b26c8d 100644
--- a/backend/src/server/app.ts
+++ b/backend/src/server/app.ts
@@ -80,8 +80,8 @@ export const main = async ({ db, smtp, logger, queue, keyStore }: TMain) => {
if (appCfg.isProductionMode) {
await server.register(registerExternalNextjs, {
- standaloneMode: appCfg.STANDALONE_MODE,
- dir: path.join(__dirname, "../../"),
+ standaloneMode: appCfg.STANDALONE_MODE || process?.pkg,
+ dir: path.join(__dirname, process?.pkg ? "../../../" : "../../"),
port: appCfg.PORT
});
}