diff --git a/HelmChart/public/oneuptime/templates/_helpers.tpl b/HelmChart/public/oneuptime/templates/_helpers.tpl index be5216ace5..d6b285dd14 100644 --- a/HelmChart/public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/public/oneuptime/templates/_helpers.tpl @@ -165,8 +165,17 @@ spec: imagePullPolicy: {{ $.Values.image.pullPolicy }} env: {{- include "oneuptime.env.common" . | nindent 22 }} + {{- if $.IsUI }} + {{- include "oneuptime.env.commonUi" . | nindent 22 }} + {{- end }} + {{- if $.IsServer }} + {{- include "oneuptime.env.commonServer" . | nindent 22 }} + {{- end }} {{- if $.Env }} - + {{- range $key, $val := $.Env }} + - name: {{ $key }} + value: {{ $val }} + {{- end }} {{- end }} ports: - containerPort: {{ $.Port }} diff --git a/HelmChart/public/oneuptime/templates/notification.yaml b/HelmChart/public/oneuptime/templates/notification.yaml index 2c37dc6f09..b2d41f1ecb 100644 --- a/HelmChart/public/oneuptime/templates/notification.yaml +++ b/HelmChart/public/oneuptime/templates/notification.yaml @@ -4,7 +4,8 @@ --- # OneUptime notification Service -{{- $notificationServiceArgs := dict "ServiceName" "notification" "Port" $.Values.port.notification "Release" $.Release "Values" $.Values -}} +{{- $notificationEnv := dict "PORT" $.Values.port.notification "SMS_DEFAULT_COST_IN_CENTS" $.Values.billing.smsDefaultValueInCents "CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE" $.Values.billing.callDefaultValueInCentsPerMinute "INTERNAL_SMTP_EMAIL" $.Values.internalSmtp.email "INTERNAL_SMTP_PASSWORD" $.Values.internalSmtp.password -}} +{{- $notificationServiceArgs := dict "ServiceName" "notification" "Port" $.Values.port.notification "Release" $.Release "Values" $.Values "Env" $notificationEnv -}} {{- include "oneuptime.service" $notificationServiceArgs }} --- diff --git a/HelmChart/public/oneuptime/values.yaml b/HelmChart/public/oneuptime/values.yaml index f93b8a89d2..ccfeea20d1 100644 --- a/HelmChart/public/oneuptime/values.yaml +++ b/HelmChart/public/oneuptime/values.yaml @@ -74,6 +74,8 @@ internalSmtp: sendingDomain: dkimPrivateKey: dkimPublicKey: + email: + name: incidents: disableAutomaticCreation: false @@ -105,3 +107,5 @@ port: statusPage: 3105 dashboard: 3009 adminDashboard: 3158 + nginx: 80 + haraka: 2525 diff --git a/Notification/Config.ts b/Notification/Config.ts index 635bc976d2..1d460e9d22 100644 --- a/Notification/Config.ts +++ b/Notification/Config.ts @@ -8,22 +8,20 @@ import GlobalConfigService from 'CommonServer/Services/GlobalConfigService'; import Phone from 'Common/Types/Phone'; import EmailServer from 'Common/Types/Email/EmailServer'; -export const InternalSmtpUsername: string = - process.env['INTERNAL_SMTP_USERNAME'] || ''; +export const InternalSmtpUsername: string = 'oneuptime'; export const InternalSmtpPassword: string = process.env['INTERNAL_SMTP_PASSWORD'] || ''; export const InternalSmtpHost: Hostname = new Hostname( - process.env['INTERNAL_SMTP_HOST'] || '' + 'haraka' ); export const InternalSmtpPort: Port = new Port( - parseInt(process.env['INTERNAL_SMTP_PORT'] || '25') + 2525 ); -export const InternalSmtpSecure: boolean = - process.env['INTERNAL_SMTP_IS_SECURE'] === 'true'; +export const InternalSmtpSecure: boolean = false; export const InternalSmtpEmail: Email = new Email( process.env['INTERNAL_SMTP_EMAIL'] || 'noreply@oneuptime.com' diff --git a/config.example.env b/config.example.env index 238929bc86..025a1e78f5 100644 --- a/config.example.env +++ b/config.example.env @@ -98,21 +98,12 @@ ADMIN_DASHBOARD_PORT=3158 # If USE_INTERNAL_SMTP is true then you need to fill these values. +INTERNAL_SMTP_FROM_NAME=OneUptime INTERNAL_SMTP_DKIM_PRIVATE_KEY_AS_BASE64= INTERNAL_SMTP_DKIM_PUBLIC_KEY_AS_BASE64= INTERNAL_SMTP_EMAIL=test@yourcompany.com INTERNAL_SMTP_SENDING_DOMAIN=yourcompany.com -# Safely ignore these. -INTERNAL_SMTP_USERNAME=oneuptime -INTERNAL_SMTP_PORT=2525 -INTERNAL_SMTP_FROM_NAME=OneUptime -INTERNAL_SMTP_IS_SECURE=false -INTERNAL_SMTP_HOST=haraka -INTERNAL_SMTP_DKIM_SELECTOR=oneuptime - - - # Licensing Database AIRTABLE_API_KEY= AIRTABLE_BASE_ID= diff --git a/docker-compose.base.yml b/docker-compose.base.yml index efbc7062aa..01cb9a6c88 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -77,9 +77,9 @@ services: image: oneuptime/haraka:${APP_TAG} restart: always environment: - SMTP_USERNAME: ${INTERNAL_SMTP_USERNAME} + SMTP_USERNAME: oneuptime SMTP_PASSWORD: ${INTERNAL_SMTP_PASSWORD} - DKIM_SELECTOR: ${INTERNAL_SMTP_DKIM_SELECTOR} + DKIM_SELECTOR: oneuptime DOMAIN: ${INTERNAL_SMTP_SENDING_DOMAIN} DKIM_PRIVATE_KEY: ${INTERNAL_SMTP_DKIM_PRIVATE_KEY_AS_BASE64} DKIM_PUBLIC_KEY: ${INTERNAL_SMTP_DKIM_PUBLIC_KEY_AS_BASE64} @@ -129,11 +129,7 @@ services: SMS_DEFAULT_COST_IN_CENTS: ${SMS_DEFAULT_COST_IN_CENTS} CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE: ${CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE} INTERNAL_SMTP_EMAIL: ${INTERNAL_SMTP_EMAIL} - INTERNAL_SMTP_USERNAME: ${INTERNAL_SMTP_USERNAME} INTERNAL_SMTP_PASSWORD: ${INTERNAL_SMTP_PASSWORD} - INTERNAL_SMTP_HOST: ${INTERNAL_SMTP_HOST} - INTERNAL_SMTP_PORT: ${INTERNAL_SMTP_PORT} - INTERNAL_SMTP_IS_SECURE: ${INTERNAL_SMTP_IS_SECURE} depends_on: - haraka