conditionally build standalone infisical

This commit is contained in:
Maidul Islam
2023-10-17 14:32:56 +01:00
parent 5d4a37004e
commit 7fd15a06e5
2 changed files with 2 additions and 1 deletions

View File

@@ -105,6 +105,7 @@ COPY --from=frontend-runner /app ./backend/frontend-build
ENV PORT 8080
ENV HTTPS_ENABLED false
ENV NODE_ENV production
ENV STANDALONE_BUILD true
WORKDIR /backend

View File

@@ -150,7 +150,7 @@ const main = async () => {
next();
});
if ((await getNodeEnv()) === "production") {
if ((await getNodeEnv()) === "production" && process.env.STANDALONE_BUILD === "true") {
const nextJsBuildPath = path.join(__dirname, "../frontend-build");
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore