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

This commit is contained in:
nicolas.dorier
2018-09-30 20:00:48 +09:00
2 changed files with 16 additions and 4 deletions

View File

@@ -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"

View File

@@ -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