Add docker-compose to use during tests with postgres

This commit is contained in:
NicolasDorier 2017-09-28 00:16:37 +09:00
parent 9b6ebf0300
commit e47a5b8721
5 changed files with 33 additions and 0 deletions

1
.gitignore vendored
View File

@ -287,3 +287,4 @@ __pycache__/
*.btm.cs
*.odx.cs
*.xsd.cs
/BTCPayServer/Build/dockerfiles

View File

@ -3,6 +3,12 @@
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Build\dockerfiles\**" />
<Content Remove="Build\dockerfiles\**" />
<EmbeddedResource Remove="Build\dockerfiles\**" />
<None Remove="Build\dockerfiles\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Currencies.txt" />
</ItemGroup>

View File

@ -0,0 +1,8 @@
FROM microsoft/dotnet:2.0.0-sdk
RUN mkdir /btcpayserver
COPY "dockerfiles/" "/btcpayserver/"
ENTRYPOINT ["dotnet", "/btcpayserver/BTCPayServer.dll"]
ENV POSTGRES="User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver"
CMD ["--testnet", "--explorercookiefile=/.cookie", "--explorerurl=https://nbxplorer-testnet-public.azurewebsites.net/", "--bind=0.0.0.0"]

View File

@ -0,0 +1,12 @@
version: "3"
services:
btcpayserver:
ports:
- 23001:23001
build:
context: .
dockerfile: DockerFile
postgres:
image: postgres:9.6.5

View File

@ -0,0 +1,6 @@
pushd .
cd ..
dotnet publish -c Release
popd
robocopy ..\bin\Release\netcoreapp2.0\publish\ dockerfiles /e
docker-compose up --force-recreate --build