mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 14:49:07 +00:00
remove host settings from admin dash
This commit is contained in:
parent
668d00418d
commit
a716d54cc6
@ -47,20 +47,6 @@ const Settings: FunctionComponent = (): ReactElement => {
|
||||
isEditable={true}
|
||||
editButtonText="Edit Host"
|
||||
formFields={[
|
||||
{
|
||||
field: {
|
||||
host: true,
|
||||
},
|
||||
title: 'Host',
|
||||
fieldType: FormFieldSchemaType.Text,
|
||||
required: true,
|
||||
description:
|
||||
'IP address or Hostname of this server instance.',
|
||||
placeholder: 'oneuptime.yourcompany.com',
|
||||
validation: {
|
||||
minLength: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: {
|
||||
useHttps: true,
|
||||
@ -76,15 +62,6 @@ const Settings: FunctionComponent = (): ReactElement => {
|
||||
modelType: GlobalConfig,
|
||||
id: 'model-detail-global-config',
|
||||
fields: [
|
||||
{
|
||||
field: {
|
||||
host: true,
|
||||
},
|
||||
title: 'Host',
|
||||
placeholder: 'None',
|
||||
description:
|
||||
'IP address or Hostname of this server instance.',
|
||||
},
|
||||
{
|
||||
field: {
|
||||
useHttps: true,
|
||||
|
@ -30,7 +30,6 @@ export default class GlobalConfigAPI extends BaseAPI<
|
||||
await GlobalConfigService.findOneById({
|
||||
id: ObjectID.getZeroObjectID(),
|
||||
select: {
|
||||
host: true,
|
||||
useHttps: true,
|
||||
},
|
||||
props: {
|
||||
@ -39,7 +38,6 @@ export default class GlobalConfigAPI extends BaseAPI<
|
||||
});
|
||||
|
||||
return Response.sendJsonObjectResponse(req, res, {
|
||||
HOST: globalConfig?.host?.toString() || 'localhost',
|
||||
USE_HTTPS:
|
||||
globalConfig?.useHttps?.toString() || 'false',
|
||||
});
|
||||
|
@ -32,8 +32,7 @@ export default class DatabaseConfig {
|
||||
|
||||
public static async getHost(): Promise<Hostname> {
|
||||
return (
|
||||
((await DatabaseConfig.getFromGlobalConfig('host')) as Hostname) ||
|
||||
new Hostname('localhost')
|
||||
Promise.resolve(new Hostname(process.env['HOST'] || 'localhost'))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -39,25 +39,6 @@ export enum EmailServerType {
|
||||
update: [],
|
||||
})
|
||||
export default class GlobalConfig extends GlobalConfigModel {
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
type: TableColumnType.ShortText,
|
||||
title: 'Host',
|
||||
description:
|
||||
'Server Hostname or an IP address where OneUptime is hosted on.',
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.ShortText,
|
||||
length: ColumnLength.ShortText,
|
||||
nullable: true,
|
||||
unique: true,
|
||||
transformer: Hostname.getDatabaseTransformer(),
|
||||
})
|
||||
public host?: Hostname = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
|
@ -162,7 +162,7 @@ server {
|
||||
|
||||
listen 80;
|
||||
|
||||
server_name localhost ${DOMAIN}; #All domains
|
||||
server_name localhost ${HOST}; #All domains
|
||||
|
||||
proxy_busy_buffers_size 512k;
|
||||
proxy_buffers 4 512k;
|
||||
|
@ -14,7 +14,6 @@ export default class AddDefaultGlobalConfig extends DataMigrationBase {
|
||||
|
||||
const globalConfig: GlobalConfig = new GlobalConfig();
|
||||
globalConfig.id = ObjectID.getZeroObjectID();
|
||||
globalConfig.host = new Hostname('localhost');
|
||||
globalConfig.useHttps = false;
|
||||
globalConfig.emailServerType = EmailServerType.Internal;
|
||||
globalConfig.sendgridFromName = 'OneUptime';
|
||||
|
@ -33,7 +33,6 @@ export default class UpdateGlobalConfigFromEnv extends DataMigrationBase {
|
||||
twilioPhoneNumber: process.env['TWILIO_PHONE_NUMBER'] || '',
|
||||
|
||||
// Update host
|
||||
host: process.env['DOMAIN'] || 'localhost',
|
||||
useHttps: process.env['HTTP_PROTOCOL'] === 'https',
|
||||
|
||||
// Update SMTP
|
||||
|
@ -1,6 +1,7 @@
|
||||
version: '3.7'
|
||||
|
||||
x-common-variables: &common-variables
|
||||
HOST: ${HOST}
|
||||
NODE_ENV: ${ENVIRONMENT}
|
||||
BILLING_ENABLED: ${BILLING_ENABLED}
|
||||
BILLING_PUBLIC_KEY: ${BILLING_PUBLIC_KEY}
|
||||
@ -107,7 +108,7 @@ services:
|
||||
- clickhouse:/var/lib/clickhouse/
|
||||
|
||||
postgres:
|
||||
image: postgres:latest
|
||||
image: postgres:15
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: ${DATABASE_USERNAME}
|
||||
|
Loading…
Reference in New Issue
Block a user