mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
use environment variable for configuring BTCPayServer
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
<PackageReference Include="NBXplorer.Client" Version="1.0.0.12" />
|
<PackageReference Include="NBXplorer.Client" Version="1.0.0.12" />
|
||||||
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.1" />
|
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.1" />
|
||||||
<PackageReference Include="NicolasDorier.CommandLine.Configuration" Version="1.0.0.2" />
|
<PackageReference Include="NicolasDorier.CommandLine.Configuration" Version="1.0.0.2" />
|
||||||
<PackageReference Include="NicolasDorier.StandardConfiguration" Version="1.0.0.11" />
|
<PackageReference Include="NicolasDorier.StandardConfiguration" Version="1.0.0.12" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.0.0" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.0.0" />
|
||||||
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
|
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
|
||||||
<PackageReference Include="System.Xml.XmlSerializer" Version="4.0.11" />
|
<PackageReference Include="System.Xml.XmlSerializer" Version="4.0.11" />
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
FROM microsoft/dotnet:2.0.0-sdk
|
FROM microsoft/aspnetcore:2.0.0
|
||||||
|
|
||||||
RUN mkdir /btcpayserver
|
WORKDIR /app
|
||||||
COPY "dockerfiles/" "/btcpayserver/"
|
COPY "dockerfiles/" .
|
||||||
|
|
||||||
ENTRYPOINT ["dotnet", "/btcpayserver/BTCPayServer.dll"]
|
ENV BTCPAY_POSTGRES="User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver"
|
||||||
ENV POSTGRES="User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver"
|
ENV BTCPAY_NETWORK="testnet"
|
||||||
CMD ["--testnet", "--explorercookiefile=/.cookie", "--explorerurl=https://nbxplorer-testnet-public.azurewebsites.net/", "--bind=0.0.0.0"]
|
ENV BTCPAY_EXPLORERURL="https://nbxplorer-testnet-public.azurewebsites.net/"
|
||||||
|
ENV BTCPAY_BIND="0.0.0.0:80"
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "BTCPayServer.dll"]
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
pushd .
|
pushd .
|
||||||
cd ..
|
cd ..
|
||||||
|
dotnet restore
|
||||||
dotnet publish -c Release
|
dotnet publish -c Release
|
||||||
popd
|
popd
|
||||||
robocopy ..\bin\Release\netcoreapp2.0\publish\ dockerfiles /e
|
robocopy ..\bin\Release\netcoreapp2.0\publish\ dockerfiles /e
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ namespace BTCPayServer.Configuration
|
|||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string EnvironmentVariablePrefix => "BTCPAY_";
|
||||||
|
|
||||||
protected override string GetDefaultDataDir(IConfiguration conf)
|
protected override string GetDefaultDataDir(IConfiguration conf)
|
||||||
{
|
{
|
||||||
return GetNetwork(conf).DefaultDataDirectory;
|
return GetNetwork(conf).DefaultDataDirectory;
|
||||||
|
|||||||
@@ -268,6 +268,7 @@ namespace BTCPayServer.Controllers
|
|||||||
var callbackUrl = Url.EmailConfirmationLink(user.Id, code, Request.Scheme);
|
var callbackUrl = Url.EmailConfirmationLink(user.Id, code, Request.Scheme);
|
||||||
RegisteredUserId = user.Id;
|
RegisteredUserId = user.Id;
|
||||||
await _emailSender.SendEmailConfirmationAsync(model.Email, callbackUrl);
|
await _emailSender.SendEmailConfirmationAsync(model.Email, callbackUrl);
|
||||||
|
_logger.LogInformation("User created a new account with password.");
|
||||||
if(!policies.RequiresConfirmedEmail)
|
if(!policies.RequiresConfirmedEmail)
|
||||||
{
|
{
|
||||||
await _signInManager.SignInAsync(user, isPersistent: false);
|
await _signInManager.SignInAsync(user, isPersistent: false);
|
||||||
@@ -278,7 +279,6 @@ namespace BTCPayServer.Controllers
|
|||||||
TempData["StatusMessage"] = "Account created, please confirm your email";
|
TempData["StatusMessage"] = "Account created, please confirm your email";
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
_logger.LogInformation("User created a new account with password.");
|
|
||||||
}
|
}
|
||||||
AddErrors(result);
|
AddErrors(result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user