fix: add default node_env variable
This commit is contained in:
@@ -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) => {
|
||||
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user