1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

configure send for self-host

This commit is contained in:
Kyle Spearrin 2020-11-03 14:29:07 -05:00
parent 82dd364e65
commit d2ab098ca5
3 changed files with 9 additions and 2 deletions

View File

@ -34,4 +34,4 @@ mkdir -p /etc/bitwarden/core/attachments
chown -R $USERNAME:$GROUPNAME /etc/bitwarden
exec gosu $USERNAME:$GROUPNAME dotnet /bitwarden_server/Server.dll \
/contentRoot=/etc/bitwarden/core/attachments /webRoot=. /serveUnknown=true
/webRoot=/etc/bitwarden/core/attachments /serveUnknown=true

View File

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Hosting;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
@ -27,6 +28,10 @@ namespace Bit.Server
{
builder.UseContentRoot(contentRoot);
}
else
{
builder.UseContentRoot(Directory.GetCurrentDirectory());
}
var webRoot = config.GetValue<string>("webRoot");
if (string.IsNullOrWhiteSpace(webRoot))

View File

@ -99,6 +99,8 @@ namespace Bit.Setup
["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,