Refactor environment variable assignments and update port number

This commit is contained in:
Simon Larsen 2024-01-29 07:25:11 +00:00
parent 865c7f0996
commit 66fb6f8b90
No known key found for this signature in database
GPG key ID: AB45983AA9C81CDE
3 changed files with 3 additions and 7 deletions

View file

@ -1,7 +1,5 @@
# OneUptime app Deployment
{{- $certVolume := dict "Name" (printf "%s-%s" $.Release.Name "certs") "MountPath" "/usr/src/Certs" }}
{{- $appVolumes := dict "certs" $certVolume }}
{{- $appEnv := dict "PORT" $.Values.port.app "Volumes" $appVolumes "SMS_HIGH_RISK_COST_IN_CENTS" $.Values.billing.smsHighRiskValueInCents "CALL_HIGH_RISK_COST_IN_CENTS_PER_MINUTE" $.Values.billing.callHighRiskValueInCentsPerMinute "SMS_DEFAULT_COST_IN_CENTS" $.Values.billing.smsDefaultValueInCents "CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE" $.Values.billing.callDefaultValueInCentsPerMinute "INTERNAL_SMTP_FROM_NAME" $.Values.internalSmtp.name "INTERNAL_SMTP_EMAIL" $.Values.internalSmtp.email "INTERNAL_SMTP_PASSWORD" "internal_smtp_password" -}}
{{- $appEnv := dict "PORT" $.Values.port.app "SMS_HIGH_RISK_COST_IN_CENTS" $.Values.billing.smsHighRiskValueInCents "CALL_HIGH_RISK_COST_IN_CENTS_PER_MINUTE" $.Values.billing.callHighRiskValueInCentsPerMinute "SMS_DEFAULT_COST_IN_CENTS" $.Values.billing.smsDefaultValueInCents "CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE" $.Values.billing.callDefaultValueInCentsPerMinute "INTERNAL_SMTP_FROM_NAME" $.Values.internalSmtp.name "INTERNAL_SMTP_EMAIL" $.Values.internalSmtp.email "INTERNAL_SMTP_PASSWORD" "internal_smtp_password" -}}
{{- $appDeploymentArgs :=dict "IsServer" true "ServiceName" "app" "Port" $.Values.port.app "Release" $.Release "Values" $.Values "Env" $appEnv -}}
{{- include "oneuptime.deployment" $appDeploymentArgs }}
---

View file

@ -1,7 +1,5 @@
# OneUptime nginx Service
{{- $nginxCertVolume := dict "Name" (printf "%s-%s" $.Release.Name "certs") "MountPath" "/etc/nginx/certs" }}
{{- $nginxVolumes := dict "certs" $nginxCertVolume }}
{{- $nginxDeploymentArgs :=dict "isHTTPSPortEnabled" true "IsServer" true "ServiceName" "nginx" "Port" $.Values.port.nginx "Release" $.Release "Values" $.Values "Volumes" $nginxVolumes -}}
{{- $nginxDeploymentArgs :=dict "isHTTPSPortEnabled" true "IsServer" true "ServiceName" "nginx" "Port" $.Values.port.nginx "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.deployment" $nginxDeploymentArgs }}
---

View file

@ -2,7 +2,7 @@ import logger from 'CommonServer/Utils/Logger';
import App from 'CommonServer/Utils/StartServer';
import { PostgresAppInstance } from 'CommonServer/Infrastructure/PostgresDatabase';
process.env['PORT'] = "7845";
process.env['PORT'] = "7845"; // any random port number
const APP_NAME: string = 'ingress';