fix: add default node_env variable
This commit is contained in:
parent
14201f4052
commit
93430e5607
@ -25,7 +25,7 @@ export default async function (data) {
|
||||
if (!dockerComposeYaml.services) {
|
||||
throw 'No Services found in docker-compose file.';
|
||||
}
|
||||
const envs = [];
|
||||
const envs = ['NODE_ENV=production'];
|
||||
if (secrets.length > 0) {
|
||||
secrets.forEach((secret) => {
|
||||
if (pullmergeRequestId) {
|
||||
|
@ -461,7 +461,8 @@ export async function restartApplication(request: FastifyRequest<RestartApplicat
|
||||
const { dockerRegistry, secrets, pullmergeRequestId, port, repository, persistentStorage, id: applicationId, buildPack, exposePort } = application;
|
||||
let location = null;
|
||||
const envs = [
|
||||
`PORT=${port}`
|
||||
`PORT=${port}`,
|
||||
'NODE_ENV=production'
|
||||
];
|
||||
if (secrets.length > 0) {
|
||||
secrets.forEach((secret) => {
|
||||
@ -484,7 +485,7 @@ export async function restartApplication(request: FastifyRequest<RestartApplicat
|
||||
} else {
|
||||
if (!secret.isPRMRSecret) {
|
||||
if (secret.value.includes('\\n')|| secret.value.includes("'")) {
|
||||
envs.push(`${secret.name}=${secret.value}`);
|
||||
envs.push(`${secret.name}=${secret.value}`);
|
||||
} else {
|
||||
envs.push(`${secret.name}='${secret.value}'`);
|
||||
}
|
||||
@ -1175,7 +1176,8 @@ export async function restartPreview(request: FastifyRequest<RestartPreviewAppli
|
||||
const { secrets, port, repository, persistentStorage, id: applicationId, buildPack, exposePort } = application;
|
||||
|
||||
const envs = [
|
||||
`PORT=${port}`
|
||||
`PORT=${port}`,
|
||||
'NODE_ENV=production'
|
||||
];
|
||||
if (secrets.length > 0) {
|
||||
secrets.forEach((secret) => {
|
||||
|
@ -203,7 +203,7 @@ export const applicationsRouter = router({
|
||||
let location = null;
|
||||
const labels = [];
|
||||
let image = null;
|
||||
const envs = [`PORT=${port}`];
|
||||
const envs = [`PORT=${port}`, 'NODE_ENV=production'];
|
||||
|
||||
if (secrets.length > 0) {
|
||||
secrets.forEach((secret) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user