mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-01 00:11:59 +08:00
feat: NODE_ENV is configured in the frontend
This commit is contained in:
parent
53528f1045
commit
ce67005d66
@ -12,6 +12,9 @@ WORKDIR /frontend
|
|||||||
# copy the package.json to install dependencies
|
# copy the package.json to install dependencies
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
|
|
||||||
|
# configure node_env as production
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
# Install the dependencies and make the folder
|
# Install the dependencies and make the folder
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
|
|
||||||
|
@ -3,4 +3,6 @@ export const ENVIRONMENT = {
|
|||||||
process?.env?.FRONTEND_API_ENDPOINT ||
|
process?.env?.FRONTEND_API_ENDPOINT ||
|
||||||
process?.env?.GITPOD_WORKSPACE_URL?.replace('://', '://8080-') ||
|
process?.env?.GITPOD_WORKSPACE_URL?.replace('://', '://8080-') ||
|
||||||
'',
|
'',
|
||||||
|
isProduction: process?.env?.NODE_ENV === 'production',
|
||||||
|
NODE_ENV: process?.env?.NODE_ENV,
|
||||||
};
|
};
|
||||||
|
@ -3,6 +3,7 @@ declare global {
|
|||||||
namespace NodeJS {
|
namespace NodeJS {
|
||||||
interface ProcessEnv {
|
interface ProcessEnv {
|
||||||
FRONTEND_API_ENDPOINT: string | undefined;
|
FRONTEND_API_ENDPOINT: string | undefined;
|
||||||
|
NODE_ENV: 'development' | 'production' | 'test';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user