From 456516c7f299ce03114407cbebeec9bf3c481cc1 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Thu, 28 Dec 2023 16:56:05 +0000 Subject: [PATCH] Update server and API hostnames and ports --- CommonServer/EnvironmentConfig.ts | 4 ++-- CommonUI/src/Config.ts | 6 +++--- CommonUI/src/Utils/API/DashboardAPI.ts | 4 ++-- .../Utils/AnalyticsModelAPI/AnalyticsModelAPI.ts | 14 +++++++------- CommonUI/src/Utils/ModelAPI/ModelAPI.ts | 14 +++++++------- Dashboard/src/App.tsx | 4 ++-- .../src/Components/MonitorGroup/CurrentStatus.tsx | 4 ++-- .../src/Components/NotificationMethods/Call.tsx | 6 +++--- .../src/Components/NotificationMethods/Email.tsx | 6 +++--- .../src/Components/NotificationMethods/SMS.tsx | 6 +++--- Dashboard/src/Pages/Monitor/View/Probes.tsx | 4 ++-- Dashboard/src/Pages/MonitorGroup/View/Index.tsx | 6 +++--- Dashboard/src/Pages/Onboarding/SSO.tsx | 4 ++-- Dashboard/src/Pages/Settings/Billing.tsx | 4 ++-- Dashboard/src/Pages/Settings/Invoices.tsx | 4 ++-- .../src/Pages/Settings/NotificationSettings.tsx | 4 ++-- Dashboard/src/Pages/Settings/Probes.tsx | 4 ++-- HelmChart/Public/oneuptime/templates/_helpers.tpl | 6 ++---- Nginx/default.conf.template | 2 +- config.example.env | 6 ++---- docker-compose.base.yml | 7 +++---- 21 files changed, 57 insertions(+), 62 deletions(-) diff --git a/CommonServer/EnvironmentConfig.ts b/CommonServer/EnvironmentConfig.ts index 0fbff1d39d..c735df9a41 100644 --- a/CommonServer/EnvironmentConfig.ts +++ b/CommonServer/EnvironmentConfig.ts @@ -79,8 +79,8 @@ export const WorkflowHostname: Hostname = Hostname.fromString( ); export const DashboardApiHostname: Hostname = Hostname.fromString( - `${process.env['SERVER_DASHBOARD_API_HOSTNAME'] || 'localhost'}:${ - process.env['DASHBOARD_API_PORT'] || 80 + `${process.env['SERVER_APP_HOSTNAME'] || 'localhost'}:${ + process.env['APP_PORT'] || 80 }` ); diff --git a/CommonUI/src/Config.ts b/CommonUI/src/Config.ts index ce633512e2..57be3bd1c8 100644 --- a/CommonUI/src/Config.ts +++ b/CommonUI/src/Config.ts @@ -41,7 +41,7 @@ export const BILLING_PUBLIC_KEY: string = env('BILLING_PUBLIC_KEY') || ''; export const VERSION: Version = new Version(env('VERSION') || '1.0.0'); -export const DASHBOARD_API_HOSTNAME: Hostname = Hostname.fromString(HOST); +export const APP_HOSTNAME: Hostname = Hostname.fromString(HOST); export const IDENTITY_HOSTNAME: Hostname = Hostname.fromString(HOST); @@ -70,9 +70,9 @@ export const HOME_HOSTNAME: Hostname = Hostname.fromString(HOST); export const FILE_HOSTNAME: Hostname = Hostname.fromString(HOST); -export const DASHBOARD_API_URL: URL = new URL( +export const APP_URL: URL = new URL( HTTP_PROTOCOL, - DASHBOARD_API_HOSTNAME, + APP_HOSTNAME, DashboardApiRoute ); diff --git a/CommonUI/src/Utils/API/DashboardAPI.ts b/CommonUI/src/Utils/API/DashboardAPI.ts index 63f7a872f4..587d47517c 100755 --- a/CommonUI/src/Utils/API/DashboardAPI.ts +++ b/CommonUI/src/Utils/API/DashboardAPI.ts @@ -1,10 +1,10 @@ -import { DASHBOARD_API_HOSTNAME, HTTP_PROTOCOL } from '../../Config'; +import { APP_HOSTNAME, HTTP_PROTOCOL } from '../../Config'; import { DashboardApiRoute } from 'Common/ServiceRoute'; import BaseAPI from './API'; class BackendAPI extends BaseAPI { public constructor() { - super(HTTP_PROTOCOL, DASHBOARD_API_HOSTNAME, DashboardApiRoute); + super(HTTP_PROTOCOL, APP_HOSTNAME, DashboardApiRoute); } } diff --git a/CommonUI/src/Utils/AnalyticsModelAPI/AnalyticsModelAPI.ts b/CommonUI/src/Utils/AnalyticsModelAPI/AnalyticsModelAPI.ts index 689f7669c7..edea4ef1fe 100644 --- a/CommonUI/src/Utils/AnalyticsModelAPI/AnalyticsModelAPI.ts +++ b/CommonUI/src/Utils/AnalyticsModelAPI/AnalyticsModelAPI.ts @@ -6,7 +6,7 @@ import API from '../API/API'; import Route from 'Common/Types/API/Route'; import URL from 'Common/Types/API/URL'; import BadDataException from 'Common/Types/Exception/BadDataException'; -import { DASHBOARD_API_URL } from '../../Config'; +import { APP_URL } from '../../Config'; import HTTPResponse from 'Common/Types/API/HTTPResponse'; import HTTPMethod from 'Common/Types/API/HTTPMethod'; import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse'; @@ -95,7 +95,7 @@ export default class ModelAPI { ); } - apiUrl = URL.fromURL(DASHBOARD_API_URL).addRoute(apiPath); + apiUrl = URL.fromURL(APP_URL).addRoute(apiPath); } apiUrl = apiUrl.addRoute(`/${id.toString()}`); @@ -147,7 +147,7 @@ export default class ModelAPI { ); } - apiUrl = URL.fromURL(DASHBOARD_API_URL).addRoute(apiPath); + apiUrl = URL.fromURL(APP_URL).addRoute(apiPath); } const httpMethod: HTTPMethod = @@ -207,7 +207,7 @@ export default class ModelAPI { ); } - let apiUrl: URL = URL.fromURL(DASHBOARD_API_URL) + let apiUrl: URL = URL.fromURL(APP_URL) .addRoute(apiPath) .addRoute('/get-list'); @@ -273,7 +273,7 @@ export default class ModelAPI { ); } - let apiUrl: URL = URL.fromURL(DASHBOARD_API_URL) + let apiUrl: URL = URL.fromURL(APP_URL) .addRoute(apiPath) .addRoute('/count'); @@ -346,7 +346,7 @@ export default class ModelAPI { ); } - let apiUrl: URL = URL.fromURL(DASHBOARD_API_URL) + let apiUrl: URL = URL.fromURL(APP_URL) .addRoute(apiPath) .addRoute('/' + id.toString()) .addRoute('/get-item'); @@ -411,7 +411,7 @@ export default class ModelAPI { ); } - const apiUrl: URL = URL.fromURL(DASHBOARD_API_URL) + const apiUrl: URL = URL.fromURL(APP_URL) .addRoute(apiPath) .addRoute('/' + id.toString()); diff --git a/CommonUI/src/Utils/ModelAPI/ModelAPI.ts b/CommonUI/src/Utils/ModelAPI/ModelAPI.ts index 5dab165319..d374a2c41b 100644 --- a/CommonUI/src/Utils/ModelAPI/ModelAPI.ts +++ b/CommonUI/src/Utils/ModelAPI/ModelAPI.ts @@ -6,7 +6,7 @@ import API from '../../Utils/API/API'; import Route from 'Common/Types/API/Route'; import URL from 'Common/Types/API/URL'; import BadDataException from 'Common/Types/Exception/BadDataException'; -import { DASHBOARD_API_URL } from '../../Config'; +import { APP_URL } from '../../Config'; import HTTPResponse from 'Common/Types/API/HTTPResponse'; import HTTPMethod from 'Common/Types/API/HTTPMethod'; import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse'; @@ -88,7 +88,7 @@ export default class ModelAPI { ); } - apiUrl = URL.fromURL(DASHBOARD_API_URL).addRoute(apiPath); + apiUrl = URL.fromURL(APP_URL).addRoute(apiPath); } apiUrl = apiUrl.addRoute(`/${data.id.toString()}`); @@ -133,7 +133,7 @@ export default class ModelAPI { ); } - apiUrl = URL.fromURL(DASHBOARD_API_URL).addRoute(apiPath); + apiUrl = URL.fromURL(APP_URL).addRoute(apiPath); } const httpMethod: HTTPMethod = @@ -202,7 +202,7 @@ export default class ModelAPI { ); } - let apiUrl: URL = URL.fromURL(DASHBOARD_API_URL) + let apiUrl: URL = URL.fromURL(APP_URL) .addRoute(apiPath) .addRoute('/get-list'); @@ -271,7 +271,7 @@ export default class ModelAPI { ); } - let apiUrl: URL = URL.fromURL(DASHBOARD_API_URL) + let apiUrl: URL = URL.fromURL(APP_URL) .addRoute(apiPath) .addRoute('/count'); @@ -356,7 +356,7 @@ export default class ModelAPI { ); } - let apiUrl: URL = URL.fromURL(DASHBOARD_API_URL) + let apiUrl: URL = URL.fromURL(APP_URL) .addRoute(apiPath) .addRoute('/' + data.id.toString()) .addRoute('/get-item'); @@ -421,7 +421,7 @@ export default class ModelAPI { ); } - const apiUrl: URL = URL.fromURL(DASHBOARD_API_URL) + const apiUrl: URL = URL.fromURL(APP_URL) .addRoute(apiPath) .addRoute('/' + data.id.toString()); diff --git a/Dashboard/src/App.tsx b/Dashboard/src/App.tsx index e4b830cb27..87ae09f8dc 100644 --- a/Dashboard/src/App.tsx +++ b/Dashboard/src/App.tsx @@ -22,7 +22,7 @@ import PageMap from './Utils/PageMap'; import { ACCOUNTS_URL, BILLING_ENABLED, - DASHBOARD_API_URL, + APP_URL, } from 'CommonUI/src/Config'; import ActiveIncidents from './Pages/Global/ActiveIncidents'; @@ -180,7 +180,7 @@ const App: () => JSX.Element = () => { requestOptions: { isMultiTenantRequest: true, overrideRequestUrl: URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute('/project/list-user-projects'), }, } diff --git a/Dashboard/src/Components/MonitorGroup/CurrentStatus.tsx b/Dashboard/src/Components/MonitorGroup/CurrentStatus.tsx index a9743b2dc2..cf2f1818c2 100644 --- a/Dashboard/src/Components/MonitorGroup/CurrentStatus.tsx +++ b/Dashboard/src/Components/MonitorGroup/CurrentStatus.tsx @@ -5,7 +5,7 @@ import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage'; import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI'; import MonitorStatus from 'Model/Models/MonitorStatus'; import URL from 'Common/Types/API/URL'; -import { DASHBOARD_API_URL } from 'CommonUI/src/Config'; +import { APP_URL } from 'CommonUI/src/Config'; import BadDataException from 'Common/Types/Exception/BadDataException'; import Statusbubble from 'CommonUI/src/Components/StatusBubble/StatusBubble'; import Color from 'Common/Types/Color'; @@ -33,7 +33,7 @@ const CurrentStatusElement: FunctionComponent = ( const currentStatus: MonitorStatus | null = await ModelAPI.post({ modelType: MonitorStatus, - apiUrl: URL.fromString(DASHBOARD_API_URL.toString()) + apiUrl: URL.fromString(APP_URL.toString()) .addRoute(new MonitorGroup().getCrudApiPath()!) .addRoute('/current-status/') .addRoute(`/${props.monitorGroupId.toString()}`), diff --git a/Dashboard/src/Components/NotificationMethods/Call.tsx b/Dashboard/src/Components/NotificationMethods/Call.tsx index cccea8d615..3b03c92428 100644 --- a/Dashboard/src/Components/NotificationMethods/Call.tsx +++ b/Dashboard/src/Components/NotificationMethods/Call.tsx @@ -12,7 +12,7 @@ import URL from 'Common/Types/API/URL'; import BasicFormModal from 'CommonUI/src/Components/FormModal/BasicFormModal'; import HTTPResponse from 'Common/Types/API/HTTPResponse'; import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse'; -import { DASHBOARD_API_URL } from 'CommonUI/src/Config'; +import { APP_URL } from 'CommonUI/src/Config'; import API from 'CommonUI/src/Utils/API/API'; import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal'; @@ -170,7 +170,7 @@ const Call: () => JSX.Element = (): ReactElement => { | HTTPResponse | HTTPErrorResponse = await API.post( URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute('/user-call/verify'), { code: item['code'], @@ -237,7 +237,7 @@ const Call: () => JSX.Element = (): ReactElement => { | HTTPResponse | HTTPErrorResponse = await API.post( URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute( '/user-call/resend-verification-code' ), diff --git a/Dashboard/src/Components/NotificationMethods/Email.tsx b/Dashboard/src/Components/NotificationMethods/Email.tsx index 526a94ce8b..d54e9e55a7 100644 --- a/Dashboard/src/Components/NotificationMethods/Email.tsx +++ b/Dashboard/src/Components/NotificationMethods/Email.tsx @@ -12,7 +12,7 @@ import URL from 'Common/Types/API/URL'; import BasicFormModal from 'CommonUI/src/Components/FormModal/BasicFormModal'; import HTTPResponse from 'Common/Types/API/HTTPResponse'; import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse'; -import { DASHBOARD_API_URL } from 'CommonUI/src/Config'; +import { APP_URL } from 'CommonUI/src/Config'; import API from 'CommonUI/src/Utils/API/API'; import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal'; @@ -170,7 +170,7 @@ const Email: () => JSX.Element = (): ReactElement => { | HTTPResponse | HTTPErrorResponse = await API.post( URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute('/user-email/verify'), { code: item['code'], @@ -237,7 +237,7 @@ const Email: () => JSX.Element = (): ReactElement => { | HTTPResponse | HTTPErrorResponse = await API.post( URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute( '/user-email/resend-verification-code' ), diff --git a/Dashboard/src/Components/NotificationMethods/SMS.tsx b/Dashboard/src/Components/NotificationMethods/SMS.tsx index b1d47af702..8f4a20c701 100644 --- a/Dashboard/src/Components/NotificationMethods/SMS.tsx +++ b/Dashboard/src/Components/NotificationMethods/SMS.tsx @@ -12,7 +12,7 @@ import URL from 'Common/Types/API/URL'; import BasicFormModal from 'CommonUI/src/Components/FormModal/BasicFormModal'; import HTTPResponse from 'Common/Types/API/HTTPResponse'; import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse'; -import { DASHBOARD_API_URL } from 'CommonUI/src/Config'; +import { APP_URL } from 'CommonUI/src/Config'; import API from 'CommonUI/src/Utils/API/API'; import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal'; @@ -170,7 +170,7 @@ const SMS: () => JSX.Element = (): ReactElement => { | HTTPResponse | HTTPErrorResponse = await API.post( URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute('/user-sms/verify'), { code: item['code'], @@ -237,7 +237,7 @@ const SMS: () => JSX.Element = (): ReactElement => { | HTTPResponse | HTTPErrorResponse = await API.post( URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute( '/user-sms/resend-verification-code' ), diff --git a/Dashboard/src/Pages/Monitor/View/Probes.tsx b/Dashboard/src/Pages/Monitor/View/Probes.tsx index 4deb9d7eda..06bc9e1788 100644 --- a/Dashboard/src/Pages/Monitor/View/Probes.tsx +++ b/Dashboard/src/Pages/Monitor/View/Probes.tsx @@ -25,7 +25,7 @@ import FieldType from 'CommonUI/src/Components/Types/FieldType'; import ProbeElement from 'CommonUI/src/Components/Probe/Probe'; import { LIMIT_PER_PROJECT } from 'Common/Types/Database/LimitMax'; import URL from 'Common/Types/API/URL'; -import { DASHBOARD_API_URL } from 'CommonUI/src/Config'; +import { APP_URL } from 'CommonUI/src/Config'; import DisabledWarning from '../../../Components/Monitor/DisabledWarning'; import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button'; import Modal, { ModalWidth } from 'CommonUI/src/Components/Modal/Modal'; @@ -91,7 +91,7 @@ const MonitorProbes: FunctionComponent = ( sort: {}, requestOptions: { overrideRequestUrl: URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute('/probe/global-probes'), }, }); diff --git a/Dashboard/src/Pages/MonitorGroup/View/Index.tsx b/Dashboard/src/Pages/MonitorGroup/View/Index.tsx index 1f45dd265e..f37e85f3b7 100644 --- a/Dashboard/src/Pages/MonitorGroup/View/Index.tsx +++ b/Dashboard/src/Pages/MonitorGroup/View/Index.tsx @@ -22,7 +22,7 @@ import ModelAPI, { ListResult } from 'CommonUI/src/Utils/ModelAPI/ModelAPI'; import MonitorStatusTimeline from 'Model/Models/MonitorStatusTimeline'; import { LIMIT_PER_PROJECT } from 'Common/Types/Database/LimitMax'; import URL from 'Common/Types/API/URL'; -import { DASHBOARD_API_URL } from 'CommonUI/src/Config'; +import { APP_URL } from 'CommonUI/src/Config'; import API from 'CommonUI/src/Utils/API/API'; import OneUptimeDate from 'Common/Types/Date'; import UptimeUtil from 'CommonUI/src/Components/MonitorGraphs/UptimeUtil'; @@ -111,7 +111,7 @@ const MonitorGroupView: FunctionComponent = ( sort: {}, requestOptions: { overrideRequestUrl: URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ) .addRoute(new MonitorGroup().getCrudApiPath()!) .addRoute('/timeline/') @@ -142,7 +142,7 @@ const MonitorGroupView: FunctionComponent = ( const currentStatus: MonitorStatus | null = await ModelAPI.post({ modelType: MonitorStatus, - apiUrl: URL.fromString(DASHBOARD_API_URL.toString()) + apiUrl: URL.fromString(APP_URL.toString()) .addRoute(new MonitorGroup().getCrudApiPath()!) .addRoute('/current-status/') .addRoute(`/${modelId.toString()}`), diff --git a/Dashboard/src/Pages/Onboarding/SSO.tsx b/Dashboard/src/Pages/Onboarding/SSO.tsx index 3d63b00bb0..b9e97fc1eb 100644 --- a/Dashboard/src/Pages/Onboarding/SSO.tsx +++ b/Dashboard/src/Pages/Onboarding/SSO.tsx @@ -7,7 +7,7 @@ import ProjectSSO from 'Model/Models/ProjectSso'; import DashboardNavigation from '../../Utils/Navigation'; import Navigation from 'CommonUI/src/Utils/Navigation'; import URL from 'Common/Types/API/URL'; -import { DASHBOARD_API_URL, IDENTITY_URL } from 'CommonUI/src/Config'; +import { APP_URL, IDENTITY_URL } from 'CommonUI/src/Config'; import Route from 'Common/Types/API/Route'; import PageLoader from 'CommonUI/src/Components/Loader/PageLoader'; @@ -31,7 +31,7 @@ const SSO: FunctionComponent = ( id="sso-list" overrideFetchApiUrl={URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ) .addRoute('/project-sso') .addRoute( diff --git a/Dashboard/src/Pages/Settings/Billing.tsx b/Dashboard/src/Pages/Settings/Billing.tsx index b7021395c6..1ed0631e4b 100644 --- a/Dashboard/src/Pages/Settings/Billing.tsx +++ b/Dashboard/src/Pages/Settings/Billing.tsx @@ -31,7 +31,7 @@ import URL from 'Common/Types/API/URL'; import { BILLING_ENABLED, BILLING_PUBLIC_KEY, - DASHBOARD_API_URL, + APP_URL, getAllEnvVars, } from 'CommonUI/src/Config'; import { Elements } from '@stripe/react-stripe-js'; @@ -124,7 +124,7 @@ const Settings: FunctionComponent = ( const response: HTTPResponse = await BaseAPI.post( - URL.fromString(DASHBOARD_API_URL.toString()).addRoute( + URL.fromString(APP_URL.toString()).addRoute( `/billing-payment-methods/setup` ), {}, diff --git a/Dashboard/src/Pages/Settings/Invoices.tsx b/Dashboard/src/Pages/Settings/Invoices.tsx index 7232d88735..b82c5cea82 100644 --- a/Dashboard/src/Pages/Settings/Invoices.tsx +++ b/Dashboard/src/Pages/Settings/Invoices.tsx @@ -16,7 +16,7 @@ import FieldType from 'CommonUI/src/Components/Types/FieldType'; import URL from 'Common/Types/API/URL'; import Pill from 'CommonUI/src/Components/Pill/Pill'; import { Green, Yellow } from 'Common/Types/BrandColors'; -import { DASHBOARD_API_URL } from 'CommonUI/src/Config'; +import { APP_URL } from 'CommonUI/src/Config'; import BaseAPI from 'CommonUI/src/Utils/API/API'; import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI'; import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal'; @@ -41,7 +41,7 @@ const Settings: FunctionComponent = ( const result: HTTPResponse = await BaseAPI.post( - URL.fromString(DASHBOARD_API_URL.toString()).addRoute( + URL.fromString(APP_URL.toString()).addRoute( `/billing-invoices/pay` ), { diff --git a/Dashboard/src/Pages/Settings/NotificationSettings.tsx b/Dashboard/src/Pages/Settings/NotificationSettings.tsx index b1abaf3832..4ae3de17c7 100644 --- a/Dashboard/src/Pages/Settings/NotificationSettings.tsx +++ b/Dashboard/src/Pages/Settings/NotificationSettings.tsx @@ -11,7 +11,7 @@ import PageComponentProps from '../PageComponentProps'; import DashboardSideMenu from './SideMenu'; import FieldType from 'CommonUI/src/Components/Types/FieldType'; import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; -import { BILLING_ENABLED, DASHBOARD_API_URL } from 'CommonUI/src/Config'; +import { BILLING_ENABLED, APP_URL } from 'CommonUI/src/Config'; import BasicFormModal from 'CommonUI/src/Components/FormModal/BasicFormModal'; import { JSONObject } from 'Common/Types/JSON'; import API from 'CommonUI/src/Utils/API/API'; @@ -344,7 +344,7 @@ const Settings: FunctionComponent = ( | HTTPResponse | HTTPErrorResponse = await API.post( URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute('/notification/recharge'), { amount: item['amount'], diff --git a/Dashboard/src/Pages/Settings/Probes.tsx b/Dashboard/src/Pages/Settings/Probes.tsx index d2650ecbd4..dcb738078a 100644 --- a/Dashboard/src/Pages/Settings/Probes.tsx +++ b/Dashboard/src/Pages/Settings/Probes.tsx @@ -19,7 +19,7 @@ import Statusbubble from 'CommonUI/src/Components/StatusBubble/StatusBubble'; import { Green, Red } from 'Common/Types/BrandColors'; import OneUptimeDate from 'Common/Types/Date'; import URL from 'Common/Types/API/URL'; -import { DASHBOARD_API_URL } from 'CommonUI/src/Config'; +import { APP_URL } from 'CommonUI/src/Config'; import Banner from 'CommonUI/src/Components/Banner/Banner'; import ProbeStatusElement from '../../Components/Probe/ProbeStatus'; @@ -70,7 +70,7 @@ const ProbePage: FunctionComponent = ( }} fetchRequestOptions={{ overrideRequestUrl: URL.fromString( - DASHBOARD_API_URL.toString() + APP_URL.toString() ).addRoute('/probe/global-probes'), }} noItemsMessage={'No probes found.'} diff --git a/HelmChart/Public/oneuptime/templates/_helpers.tpl b/HelmChart/Public/oneuptime/templates/_helpers.tpl index 15bbaddf8d..dfc10d3f5d 100644 --- a/HelmChart/Public/oneuptime/templates/_helpers.tpl +++ b/HelmChart/Public/oneuptime/templates/_helpers.tpl @@ -23,7 +23,7 @@ value: {{ $.Values.analytics.host }} - name: SERVER_ACCOUNTS_HOSTNAME value: {{ $.Release.Name }}-accounts.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} -- name: SERVER_DASHBOARD_API_HOSTNAME +- name: SERVER_APP_HOSTNAME value: {{ $.Release.Name }}-app.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} - name: SERVER_WORKFLOW_HOSTNAME value: {{ $.Release.Name }}-workflow.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} @@ -43,10 +43,8 @@ value: {{ $.Release.Name }}-dashboard.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} - name: SERVER_ADMIN_DASHBOARD_HOSTNAME value: {{ $.Release.Name }}-admin-dashboard.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} -- name: SERVER_API_REFERENCE_HOSTNAME - value: {{ $.Release.Name }}-api-reference.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }} -- name: DASHBOARD_API_PORT +- name: APP_PORT value: {{ $.Values.port.dashboardApi | squote }} - name: API_REFERENCE_PORT value: {{ $.Values.port.apiReference | squote }} diff --git a/Nginx/default.conf.template b/Nginx/default.conf.template index 05c5f9d3d4..b724cf32c8 100644 --- a/Nginx/default.conf.template +++ b/Nginx/default.conf.template @@ -4,7 +4,7 @@ upstream accounts { upstream app { - server ${SERVER_DASHBOARD_API_HOSTNAME}:${DASHBOARD_API_PORT} weight=10 max_fails=3 fail_timeout=30s; + server ${SERVER_APP_HOSTNAME}:${APP_PORT} weight=10 max_fails=3 fail_timeout=30s; } upstream workflow { diff --git a/config.example.env b/config.example.env index dc0f2e226b..6645af4829 100644 --- a/config.example.env +++ b/config.example.env @@ -76,22 +76,20 @@ INGESTOR_HOSTNAME=ingestor:3400 SERVER_ACCOUNTS_HOSTNAME=accounts SERVER_REALTIME_HOSTNAME=realtime -SERVER_DASHBOARD_API_HOSTNAME=app +SERVER_APP_HOSTNAME=app SERVER_WORKFLOW_HOSTNAME=workflow SERVER_ALERT_HOSTNAME=alert SERVER_INGESTOR_HOSTNAME=ingestor SERVER_TEST_SERVER_HOSTNAME=test-server -SERVER_HOME_HOSTNAME=home SERVER_WORKERS_HOSTNAME=workers SERVER_STATUS_PAGE_HOSTNAME=status-page SERVER_DASHBOARD_HOSTNAME=dashboard SERVER_ADMIN_DASHBOARD_HOSTNAME=admin-dashboard -SERVER_API_REFERENCE_HOSTNAME=api-reference OTEL_COLLECTOR_HOSTNAME=otel-collector #Ports. Usually they don't need to change. -DASHBOARD_API_PORT=3002 +APP_PORT=3002 API_REFERENCE_PORT=1445 WORKFLOW_PORT=3099 ALERT_PORT=3088 diff --git a/docker-compose.base.yml b/docker-compose.base.yml index cedb9c06ce..45ea8ee193 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -17,7 +17,7 @@ x-common-variables: &common-variables SERVER_ACCOUNTS_HOSTNAME: accounts SERVER_REALTIME_HOSTNAME: realtime - SERVER_DASHBOARD_API_HOSTNAME: app + SERVER_APP_HOSTNAME: app SERVER_WORKFLOW_HOSTNAME: workflow SERVER_ALERT_HOSTNAME: alert SERVER_INGESTOR_HOSTNAME: ingestor @@ -27,12 +27,11 @@ x-common-variables: &common-variables SERVER_STATUS_PAGE_HOSTNAME: status-page SERVER_DASHBOARD_HOSTNAME: dashboard SERVER_ADMIN_DASHBOARD_HOSTNAME: admin-dashboard - SERVER_API_REFERENCE_HOSTNAME: api-reference OTEL_COLLECTOR_HOSTNAME: otel-collector #Ports. Usually they don't need to change. - DASHBOARD_API_PORT: ${DASHBOARD_API_PORT} + APP_PORT: ${APP_PORT} API_REFERENCE_PORT: ${API_REFERENCE_PORT} WORKFLOW_PORT: ${WORKFLOW_PORT} ALERT_PORT: ${ALERT_PORT} @@ -198,7 +197,7 @@ services: restart: always environment: <<: *common-server-variables - PORT: ${DASHBOARD_API_PORT} + PORT: ${APP_PORT} SMS_DEFAULT_COST_IN_CENTS: ${SMS_DEFAULT_COST_IN_CENTS} CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE: ${CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE} SMS_HIGH_RISK_COST_IN_CENTS: ${SMS_HIGH_RISK_COST_IN_CENTS}