fix: add default node_env variable
This commit is contained in:
@@ -25,7 +25,7 @@ export default async function (data) {
|
|||||||
if (!dockerComposeYaml.services) {
|
if (!dockerComposeYaml.services) {
|
||||||
throw 'No Services found in docker-compose file.';
|
throw 'No Services found in docker-compose file.';
|
||||||
}
|
}
|
||||||
const envs = [];
|
const envs = ['NODE_ENV=production'];
|
||||||
if (secrets.length > 0) {
|
if (secrets.length > 0) {
|
||||||
secrets.forEach((secret) => {
|
secrets.forEach((secret) => {
|
||||||
if (pullmergeRequestId) {
|
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;
|
const { dockerRegistry, secrets, pullmergeRequestId, port, repository, persistentStorage, id: applicationId, buildPack, exposePort } = application;
|
||||||
let location = null;
|
let location = null;
|
||||||
const envs = [
|
const envs = [
|
||||||
`PORT=${port}`
|
`PORT=${port}`,
|
||||||
|
'NODE_ENV=production'
|
||||||
];
|
];
|
||||||
if (secrets.length > 0) {
|
if (secrets.length > 0) {
|
||||||
secrets.forEach((secret) => {
|
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 { secrets, port, repository, persistentStorage, id: applicationId, buildPack, exposePort } = application;
|
||||||
|
|
||||||
const envs = [
|
const envs = [
|
||||||
`PORT=${port}`
|
`PORT=${port}`,
|
||||||
|
'NODE_ENV=production'
|
||||||
];
|
];
|
||||||
if (secrets.length > 0) {
|
if (secrets.length > 0) {
|
||||||
secrets.forEach((secret) => {
|
secrets.forEach((secret) => {
|
||||||
|
@@ -203,7 +203,7 @@ export const applicationsRouter = router({
|
|||||||
let location = null;
|
let location = null;
|
||||||
const labels = [];
|
const labels = [];
|
||||||
let image = null;
|
let image = null;
|
||||||
const envs = [`PORT=${port}`];
|
const envs = [`PORT=${port}`, 'NODE_ENV=production'];
|
||||||
|
|
||||||
if (secrets.length > 0) {
|
if (secrets.length > 0) {
|
||||||
secrets.forEach((secret) => {
|
secrets.forEach((secret) => {
|
||||||
|
Reference in New Issue
Block a user