SKIP proj provis if is DEPLOYMENT_STRING is null
This commit is contained in:
parent
f8d6d2acfc
commit
8780f9e908
@ -40,8 +40,11 @@ fi
|
||||
|
||||
source "$REMOTE_DEFINITION"
|
||||
|
||||
# ensure our projects are provisioned according to DEPLOYMENT_STRING
|
||||
for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
||||
# let's provision the projects if specified in the remote.conf file.
|
||||
# we assume projects are created EXTERNALLY to sovereign-stack when DEPLOYMENT_STRING is null.
|
||||
if [ -n "$DEPLOYMENT_STRING" ]; then
|
||||
# ensure our projects are provisioned according to DEPLOYMENT_STRING
|
||||
for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
||||
NO_PARENS="${PROJECT_CHAIN:1:${#PROJECT_CHAIN}-2}"
|
||||
PROJECT_PREFIX=$(echo "$NO_PARENS" | cut -d'|' -f1)
|
||||
BITCOIN_CHAIN=$(echo "$NO_PARENS" | cut -d'|' -f2)
|
||||
@ -53,9 +56,11 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
||||
lxc project set "$PROJECT_NAME" features.networks=true features.images=false features.storage.volumes=true
|
||||
lxc project switch "$PROJECT_NAME"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# default values are already at regtest mode.
|
||||
if [ "$BITCOIN_CHAIN" = testnet ]; then
|
||||
# default values are already at regtest mode.
|
||||
if [ "$BITCOIN_CHAIN" = testnet ]; then
|
||||
|
||||
WWW_SSDATA_DISK_SIZE_GB=30
|
||||
WWW_BACKUP_DISK_SIZE_GB=30
|
||||
@ -69,7 +74,7 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
||||
LNPLAY_SERVER_BACKUP_DISK_SIZE_GB=20
|
||||
LNPLAY_SSERVER_DOCKER_DISK_SIZE_GB=20
|
||||
|
||||
elif [ "$BITCOIN_CHAIN" = mainnet ]; then
|
||||
elif [ "$BITCOIN_CHAIN" = mainnet ]; then
|
||||
|
||||
WWW_SSDATA_DISK_SIZE_GB=40
|
||||
WWW_BACKUP_DISK_SIZE_GB=40
|
||||
@ -83,14 +88,12 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
|
||||
LNPLAY_SERVER_BACKUP_DISK_SIZE_GB=20
|
||||
LNPLAY_SSERVER_DOCKER_DISK_SIZE_GB=400
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
export WWW_SSDATA_DISK_SIZE_GB="$WWW_SSDATA_DISK_SIZE_GB"
|
||||
export WWW_BACKUP_DISK_SIZE_GB="$WWW_BACKUP_DISK_SIZE_GB"
|
||||
export WWW_DOCKER_DISK_SIZE_GB="$WWW_DOCKER_DISK_SIZE_GB"
|
||||
export WWW_SSDATA_DISK_SIZE_GB="$WWW_SSDATA_DISK_SIZE_GB"
|
||||
export WWW_BACKUP_DISK_SIZE_GB="$WWW_BACKUP_DISK_SIZE_GB"
|
||||
export WWW_DOCKER_DISK_SIZE_GB="$WWW_DOCKER_DISK_SIZE_GB"
|
||||
|
||||
export BTCPAYSERVER_SSDATA_DISK_SIZE_GB="$BTCPAYSERVER_SSDATA_DISK_SIZE_GB"
|
||||
export BTCPAYSERVER_BACKUP_DISK_SIZE_GB="$BTCPAYSERVER_BACKUP_DISK_SIZE_GB"
|
||||
export BTCPAYSERVER_DOCKER_DISK_SIZE_GB="$BTCPAYSERVER_DOCKER_DISK_SIZE_GB"
|
||||
|
||||
done
|
||||
export BTCPAYSERVER_SSDATA_DISK_SIZE_GB="$BTCPAYSERVER_SSDATA_DISK_SIZE_GB"
|
||||
export BTCPAYSERVER_BACKUP_DISK_SIZE_GB="$BTCPAYSERVER_BACKUP_DISK_SIZE_GB"
|
||||
export BTCPAYSERVER_DOCKER_DISK_SIZE_GB="$BTCPAYSERVER_DOCKER_DISK_SIZE_GB"
|
||||
|
@ -153,7 +153,7 @@ fi
|
||||
export REMOTE_DEFINITION="$REMOTE_DEFINITION"
|
||||
source "$REMOTE_DEFINITION"
|
||||
export LXD_REMOTE_PASSWORD="$LXD_REMOTE_PASSWORD"
|
||||
export DEPLOYMENT_STRING="$DEPLOYMENT_STRING"
|
||||
|
||||
|
||||
# this is our password generation mechanism. Relying on GPG for secure password generation
|
||||
function new_pass {
|
||||
|
Loading…
Reference in New Issue
Block a user