Browse Source

configure send for self-host

pull/987/head
Kyle Spearrin 5 years ago
parent
commit
d2ab098ca5
  1. 2
      util/Attachments/entrypoint.sh
  2. 7
      util/Server/Program.cs
  3. 2
      util/Setup/EnvironmentFileBuilder.cs

2
util/Attachments/entrypoint.sh

@ -34,4 +34,4 @@ mkdir -p /etc/bitwarden/core/attachments @@ -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

7
util/Server/Program.cs

@ -1,4 +1,5 @@ @@ -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 @@ -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))

2
util/Setup/EnvironmentFileBuilder.cs

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

Loading…
Cancel
Save