rewrite build.sh to set default value to BTCPAYGEN_DOCKER_IMAGE
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
# This script will run docker-compose-generator in a container to generate the yml files
|
# This script will run docker-compose-generator in a container to generate the yml files
|
||||||
|
|
||||||
If (-not ($BTCPAYGEN_DOCKER_IMAGE)) { $BTCPAYGEN_DOCKER_IMAGE = "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"){
|
|
||||||
|
If ($BTCPAYGEN_DOCKER_IMAGE -eq "btcpayserver/docker-compose-generator:local"){
|
||||||
docker build docker-compose-generator --tag $BTCPAYGEN_DOCKER_IMAGE
|
docker build docker-compose-generator --tag $BTCPAYGEN_DOCKER_IMAGE
|
||||||
} Else {
|
} Else {
|
||||||
docker pull $BTCPAYGEN_DOCKER_IMAGE
|
docker pull $BTCPAYGEN_DOCKER_IMAGE
|
||||||
|
|||||||
5
build.sh
5
build.sh
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
: "${BTCPAYGEN_DOCKER_IMAGE:=btcpayserver/docker-compose-generator}"
|
||||||
if [ "$BTCPAYGEN_DOCKER_IMAGE" == "btcpayserver/docker-compose-generator:local" ]
|
if [ "$BTCPAYGEN_DOCKER_IMAGE" == "btcpayserver/docker-compose-generator:local" ]
|
||||||
then
|
then
|
||||||
docker build docker-compose-generator --tag $BTCPAYGEN_DOCKER_IMAGE
|
docker build docker-compose-generator --tag $BTCPAYGEN_DOCKER_IMAGE
|
||||||
else
|
else
|
||||||
docker pull ${BTCPAYGEN_DOCKER_IMAGE:-"btcpayserver/docker-compose-generator"}
|
docker pull $BTCPAYGEN_DOCKER_IMAGE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This script will run docker-compose-generator in a container to generate the yml files
|
# This script will run docker-compose-generator in a container to generate the yml files
|
||||||
@@ -23,7 +24,7 @@ docker run -v "$(pwd)/Generated:/app/Generated" \
|
|||||||
-e "BTCPAYGEN_ADDITIONAL_FRAGMENTS=$BTCPAYGEN_ADDITIONAL_FRAGMENTS" \
|
-e "BTCPAYGEN_ADDITIONAL_FRAGMENTS=$BTCPAYGEN_ADDITIONAL_FRAGMENTS" \
|
||||||
-e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" \
|
-e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" \
|
||||||
-e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" \
|
-e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" \
|
||||||
--rm ${BTCPAYGEN_DOCKER_IMAGE:-"btcpayserver/docker-compose-generator"}
|
--rm $BTCPAYGEN_DOCKER_IMAGE
|
||||||
|
|
||||||
if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then
|
if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then
|
||||||
cp Production/nginx.tmpl Generated/nginx.tmpl
|
cp Production/nginx.tmpl Generated/nginx.tmpl
|
||||||
|
|||||||
Reference in New Issue
Block a user