mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
enable default appsettings for self hosted installs (#1263)
* enable default appsettings for self hosted installs * change setters to use arrow functions * fix tests * fix global settings ref
This commit is contained in:
@ -23,21 +23,7 @@ namespace Bit.Setup
|
||||
["ASPNETCORE_ENVIRONMENT"] = "Production",
|
||||
["globalSettings__selfHosted"] = "true",
|
||||
["globalSettings__baseServiceUri__vault"] = "http://localhost",
|
||||
["globalSettings__baseServiceUri__api"] = "http://localhost/api",
|
||||
["globalSettings__baseServiceUri__identity"] = "http://localhost/identity",
|
||||
["globalSettings__baseServiceUri__admin"] = "http://localhost/admin",
|
||||
["globalSettings__baseServiceUri__sso"] = "http://localhost/sso",
|
||||
["globalSettings__baseServiceUri__portal"] = "http://localhost/portal",
|
||||
["globalSettings__baseServiceUri__notifications"] = "http://localhost/notifications",
|
||||
["globalSettings__baseServiceUri__internalNotifications"] = "http://notifications:5000",
|
||||
["globalSettings__baseServiceUri__internalAdmin"] = "http://admin:5000",
|
||||
["globalSettings__baseServiceUri__internalIdentity"] = "http://identity:5000",
|
||||
["globalSettings__baseServiceUri__internalApi"] = "http://api:5000",
|
||||
["globalSettings__baseServiceUri__internalVault"] = "http://web:5000",
|
||||
["globalSettings__baseServiceUri__internalSso"] = "http://sso:5000",
|
||||
["globalSettings__baseServiceUri__internalPortal"] = "http://portal:5000",
|
||||
["globalSettings__pushRelayBaseUri"] = "https://push.bitwarden.com",
|
||||
["globalSettings__installation__identityUri"] = "https://identity.bitwarden.com",
|
||||
};
|
||||
_mssqlValues = new Dictionary<string, string>
|
||||
{
|
||||
@ -89,23 +75,8 @@ namespace Bit.Setup
|
||||
_globalOverrideValues = new Dictionary<string, string>
|
||||
{
|
||||
["globalSettings__baseServiceUri__vault"] = _context.Config.Url,
|
||||
["globalSettings__baseServiceUri__api"] = $"{_context.Config.Url}/api",
|
||||
["globalSettings__baseServiceUri__identity"] = $"{_context.Config.Url}/identity",
|
||||
["globalSettings__baseServiceUri__admin"] = $"{_context.Config.Url}/admin",
|
||||
["globalSettings__baseServiceUri__notifications"] = $"{_context.Config.Url}/notifications",
|
||||
["globalSettings__baseServiceUri__sso"] = $"{_context.Config.Url}/sso",
|
||||
["globalSettings__baseServiceUri__portal"] = $"{_context.Config.Url}/portal",
|
||||
["globalSettings__sqlServer__connectionString"] = $"\"{dbConnectionString}\"",
|
||||
["globalSettings__identityServer__certificatePassword"] = _context.Install?.IdentityCertPassword,
|
||||
["globalSettings__attachment__baseDirectory"] = $"{_context.OutputDir}/core/attachments",
|
||||
["globalSettings__attachment__baseUrl"] = $"{_context.Config.Url}/attachments",
|
||||
["globalSettings__send__baseDirectory"] = $"{_context.OutputDir}/core/attachments/send",
|
||||
["globalSettings__send__baseUrl"] = $"{_context.Config.Url}/attachments/send",
|
||||
["globalSettings__dataProtection__directory"] = $"{_context.OutputDir}/core/aspnet-dataprotection",
|
||||
["globalSettings__logDirectory"] = $"{_context.OutputDir}/logs",
|
||||
["globalSettings__logRollBySizeLimit"] = string.Empty,
|
||||
["globalSettings__syslog__destination"] = string.Empty,
|
||||
["globalSettings__licenseDirectory"] = $"{_context.OutputDir}/core/licenses",
|
||||
["globalSettings__internalIdentityKey"] = _context.Stub ? "RANDOM_IDENTITY_KEY" :
|
||||
Helpers.SecureRandomString(64, alpha: true, numeric: true),
|
||||
["globalSettings__oidcIdentityClientKey"] = _context.Stub ? "RANDOM_IDENTITY_KEY" :
|
||||
@ -134,8 +105,6 @@ namespace Bit.Setup
|
||||
|
||||
_mssqlOverrideValues = new Dictionary<string, string>
|
||||
{
|
||||
["ACCEPT_EULA"] = "Y",
|
||||
["MSSQL_PID"] = "Express",
|
||||
["SA_PASSWORD"] = dbPassword,
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user