Browse Source

Merge branch 'feature/docker-builder' of https://github.com/Kukks/btcpayserver-docker into Kukks-feature/docker-builder

feature/auto_ssh
nicolas.dorier 6 years ago
parent
commit
b1de670ad4
  1. 10
      build.ps1
  2. 10
      build.sh

10
build.ps1

@ -1,6 +1,12 @@
# This script will run docker-compose-generator in a container to generate the yml files
docker pull btcpayserver/docker-compose-generator
If (-not ($BTCPAYGEN_DOCKER_IMAGE)) { $BTCPAYGEN_DOCKER_IMAGE = "btcpayserver/docker-compose-generator" }
If($BTCPAYGEN_DOCKER_IMAGE -eq "btcpayserver/docker-compose-generator:local"){
docker build docker-compose-generator --tag $BTCPAYGEN_DOCKER_IMAGE
} Else {
docker pull $BTCPAYGEN_DOCKER_IMAGE
}
docker run -v "$(Get-Location)\Generated:/app/Generated" `
-v "$(Get-Location)\docker-compose-generator\docker-fragments:/app/docker-fragments" `
-e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" `
@ -16,7 +22,7 @@ docker run -v "$(Get-Location)\Generated:/app/Generated" `
-e "BTCPAYGEN_ADDITIONAL_FRAGMENTS=$BTCPAYGEN_ADDITIONAL_FRAGMENTS" `
-e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" `
-e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" `
--rm btcpayserver/docker-compose-generator
--rm $BTCPAYGEN_DOCKER_IMAGE
If ($BTCPAYGEN_REVERSEPROXY -eq "nginx") {
Copy-Item ".\Production\nginx.tmpl" -Destination ".\Generated"

10
build.sh

@ -1,7 +1,13 @@
#!/bin/bash
if [ "$BTCPAYGEN_DOCKER_IMAGE" == "btcpayserver/docker-compose-generator:local" ]
then
docker build docker-compose-generator --tag $BTCPAYGEN_DOCKER_IMAGE
else
docker pull ${BTCPAYGEN_DOCKER_IMAGE:-"btcpayserver/docker-compose-generator"}
fi
# This script will run docker-compose-generator in a container to generate the yml files
docker pull btcpayserver/docker-compose-generator
docker run -v "$(pwd)/Generated:/app/Generated" \
-v "$(pwd)/docker-compose-generator/docker-fragments:/app/docker-fragments" \
-e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" \
@ -17,7 +23,7 @@ docker run -v "$(pwd)/Generated:/app/Generated" \
-e "BTCPAYGEN_ADDITIONAL_FRAGMENTS=$BTCPAYGEN_ADDITIONAL_FRAGMENTS" \
-e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" \
-e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" \
--rm btcpayserver/docker-compose-generator
--rm ${BTCPAYGEN_DOCKER_IMAGE:-"btcpayserver/docker-compose-generator"}
if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then
cp Production/nginx.tmpl Generated/nginx.tmpl

Loading…
Cancel
Save