Merge branch 'master' into parse-json-on-monitors

This commit is contained in:
Simon Larsen 2023-10-04 19:36:55 +01:00
commit 91adc172bd
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
21 changed files with 80 additions and 19 deletions

View File

@ -14,11 +14,13 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -13,11 +13,13 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -93,11 +93,13 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -62,43 +62,63 @@ export const ClusterKey: ObjectID = new ObjectID(
export const HasClusterKey: boolean = Boolean(process.env['ONEUPTIME_SECRET']);
export const RealtimeHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_REALTIME_HOSTNAME']}:${process.env['REALTIME_PORT']}`
`${process.env['SERVER_REALTIME_HOSTNAME'] || 'localhost'}:${
process.env['REALTIME_PORT'] || 80
}`
);
export const NotificationHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_NOTIFICATION_HOSTNAME']}:${process.env['NOTIFICATION_PORT']}`
`${process.env['SERVER_NOTIFICATION_HOSTNAME'] || 'localhost'}:${
process.env['NOTIFICATION_PORT'] || 80
}`
);
export const WorkerHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_WORKERS_HOSTNAME']}:${process.env['WORKERS_PORT']}`
`${process.env['SERVER_WORKERS_HOSTNAME'] || 'localhost'}:${
process.env['WORKERS_PORT'] || 80
}`
);
export const LinkShortenerHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_LINK_SHORTENER_HOSTNAME']}:${process.env['LINK_SHORTENER_PORT']}`
`${process.env['SERVER_LINK_SHORTENER_HOSTNAME' || 'localhost']}:${
process.env['LINK_SHORTENER_PORT'] || 80
}`
);
export const WorkflowHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_WORKFLOW_HOSTNAME']}:${process.env['WORKFLOW_PORT']}`
`${process.env['SERVER_WORKFLOW_HOSTNAME'] || 'localhost'}:${
process.env['WORKFLOW_PORT'] || 80
}`
);
export const DashboardApiHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_DASHBOARD_API_HOSTNAME']}:${process.env['DASHBOARD_API_PORT']}`
`${process.env['SERVER_DASHBOARD_API_HOSTNAME'] || 'localhost'}:${
process.env['DASHBOARD_API_PORT'] || 80
}`
);
export const ProbeApiHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_PROBE_API_HOSTNAME']}:${process.env['PROBE_API_PORT']}`
`${process.env['SERVER_PROBE_API_HOSTNAME'] || 'localhost'}:${
process.env['PROBE_API_PORT'] || 80
}`
);
export const AccountsHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_ACCOUNTS_HOSTNAME']}:${process.env['ACCOUNTS_PORT']}`
`${process.env['SERVER_ACCOUNTS_HOSTNAME'] || 'localhost'}:${
process.env['ACCOUNTS_PORT'] || 80
}`
);
export const HomeHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_HOME_HOSTNAME']}:${process.env['HOME_PORT']}`
`${process.env['SERVER_HOME_HOSTNAME'] || 'localhost'}:${
process.env['HOME_PORT'] || 80
}`
);
export const DashboardHostname: Hostname = Hostname.fromString(
`${process.env['SERVER_DASHBOARD_HOSTNAME']}:${process.env['DASHBOARD_PORT']}`
`${process.env['SERVER_DASHBOARD_HOSTNAME'] || 'localhost'}:${
process.env['DASHBOARD_PORT'] || 80
}`
);
export const Env: string = process.env['NODE_ENV'] || 'production';

View File

@ -13,11 +13,13 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -1019,10 +1019,12 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -42,10 +42,12 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -11,9 +11,9 @@ OneUptime is a comprehensive solution for monitoring and managing your online se
## Install Helm Chart
#### Create values.yaml file and change the default secrets.
#### Create values.yaml file.
Create a values.yaml file and change the default secrets.
Create a values.yaml file and change the host.
```yaml
host: <ip-address-or-domain-of-server>

View File

@ -137,7 +137,7 @@
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ printf "%s-%s" $.Release.Name "redis-password" }}
name: {{ printf "%s-%s" $.Release.Name "redis" }}
key: redis-password
- name: REDIS_DB
value: {{ printf "0" | squote}}

View File

@ -1,16 +1,19 @@
{{- if $.Values.billing.enabled }}
# OneUptime home Deployment
{{- $homeEnv := dict "PORT" $.Values.port.home -}}
{{- $homeDeploymentArgs :=dict "IsUI" true "ServiceName" "home" "Port" $.Values.port.home "Release" $.Release "Values" $.Values "Env" $homeEnv -}}
{{- include "oneuptime.deployment" $homeDeploymentArgs }}
---
# OneUptime home autoscaler
{{- $homeAutoScalerArgs := dict "ServiceName" "home" "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.autoscaler" $homeAutoScalerArgs }}
---
{{- end }}
# OneUptime home Service
{{- $homeServiceArgs := dict "ServiceName" "home" "Port" $.Values.port.home "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.service" $homeServiceArgs }}
---
# OneUptime home autoscaler
{{- $homeAutoScalerArgs := dict "ServiceName" "home" "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.autoscaler" $homeAutoScalerArgs }}
---

View File

@ -1,3 +1,5 @@
{{- if $.Values.testServer.enabled }}
# OneUptime testServer Deployment
{{- $testServerEnv := dict "PORT" $.Values.port.testServer -}}
{{- $testServerDeploymentArgs :=dict "IsUI" true "ServiceName" "test-server" "Port" $.Values.port.testServer "Release" $.Release "Values" $.Values "Env" $testServerEnv -}}
@ -14,3 +16,5 @@
{{- $testServerAutoScalerArgs := dict "ServiceName" "test-server" "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.autoscaler" $testServerAutoScalerArgs }}
---
{{- end }}

View File

@ -143,3 +143,7 @@ port:
adminDashboard: 3158
nginx: 80
haraka: 2525
testServer:
enabled: false

View File

@ -46,10 +46,12 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -22,11 +22,13 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -41,10 +41,12 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -49,10 +49,12 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -40,10 +40,12 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -18,11 +18,13 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -19,10 +19,12 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -121,10 +121,12 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});

View File

@ -73,11 +73,13 @@ const init: () => Promise<void> = async (): Promise<void> => {
} catch (err) {
logger.error('App Init Failed:');
logger.error(err);
throw err;
}
};
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
process.exit(1);
});