diff --git a/.gitignore b/.gitignore index eaf890eff..a59e3cdae 100644 --- a/.gitignore +++ b/.gitignore @@ -287,3 +287,4 @@ __pycache__/ *.btm.cs *.odx.cs *.xsd.cs +/BTCPayServer/Build/dockerfiles diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index fb9c22f3d..429ed2761 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -3,6 +3,12 @@ Exe netcoreapp2.0 + + + + + + diff --git a/BTCPayServer/Build/DockerFile b/BTCPayServer/Build/DockerFile new file mode 100644 index 000000000..58b0d5b05 --- /dev/null +++ b/BTCPayServer/Build/DockerFile @@ -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"] \ No newline at end of file diff --git a/BTCPayServer/Build/docker-compose.yml b/BTCPayServer/Build/docker-compose.yml new file mode 100644 index 000000000..99093c429 --- /dev/null +++ b/BTCPayServer/Build/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3" + +services: + btcpayserver: + ports: + - 23001:23001 + build: + context: . + dockerfile: DockerFile + + postgres: + image: postgres:9.6.5 diff --git a/BTCPayServer/Build/test.cmd b/BTCPayServer/Build/test.cmd new file mode 100644 index 000000000..1d4f1f360 --- /dev/null +++ b/BTCPayServer/Build/test.cmd @@ -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 \ No newline at end of file