1
1

Clams server updates.

This commit is contained in:
Derek Smith 2023-08-12 12:19:44 -04:00
parent ddcc119030
commit d88814e6e4
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
3 changed files with 26 additions and 11 deletions

View File

@ -91,6 +91,8 @@ for VIRTUAL_MACHINE in www btcpayserver; do
VM_ID=w
if [ "$VIRTUAL_MACHINE" = btcpayserver ]; then
VM_ID="b"
elif [ "$VIRTUAL_MACHINE" = clamsserver ]; then
VM_ID="c"
fi
# d for docker; b for backup; s for ss-data

View File

@ -73,6 +73,13 @@ if [ "$VIRTUAL_MACHINE" = btcpayserver ]; then
EOF
elif [ "$VIRTUAL_MACHINE" = clamsserver ]; then
cat >> "$YAML_PATH" <<EOF
limits.cpu: "${CLAMS_SERVER_CPU_COUNT}"
limits.memory: "${CLAMS_SERVER_MEMORY_MB}MB"
EOF
fi
. ./target.sh

View File

@ -43,6 +43,7 @@ RESTORE_WWW=false
RESTORE_CERTS=false
BACKUP_BTCPAY=true
SKIP_BTCPAYSERVER=false
SKIP_CLAMSSERVER=false
BACKUP_BTCPAY_ARCHIVE_PATH=
RESTORE_BTCPAY=false
SKIP_BTCPAY=false
@ -51,6 +52,7 @@ REMOTE_NAME="$(lxc remote get-default)"
STOP_SERVICES=false
USER_SAYS_YES=false
BTCPAY_SERVER_MAC_ADDRESS=
CLAMS_SERVER_MAC_ADDRESS=
# grab any modifications from the command line.
for i in "$@"; do
@ -193,7 +195,7 @@ DOMAIN_NAME="${DOMAIN_NAME}"
SITE_LANGUAGE_CODES="en"
DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)"
DEPLOY_GHOST=true
DEPLOY_CLAMS=false
DEPLOY_NEXTCLOUD=false
DEPLOY_NOSTR=false
NOSTR_ACCOUNT_PUBKEY=
@ -450,27 +452,31 @@ if [ "$SKIP_WWW" = false ]; then
fi
fi
# now let's run the www and btcpay-specific provisioning scripts.
if [ -n "$CLAMS_SERVER_MAC_ADDRESS" ]; then
export DOCKER_HOST="ssh://ubuntu@$CLAMS_SERVER_FQDN"
# don't run clams stuff if user specifies --skip-btcpayserver
if [ "$SKIP_CLAMSSERVER" = false ]; then
# now let's run the www and btcpay-specific provisioning scripts.
if [ -n "$CLAMS_SERVER_MAC_ADDRESS" ]; then
export DOCKER_HOST="ssh://ubuntu@$CLAMS_SERVER_FQDN"
# enable docker swarm mode so we can support docker stacks.
if docker info | grep -q "Swarm: inactive"; then
docker swarm init
fi
# enable docker swarm mode so we can support docker stacks.
if docker info | grep -q "Swarm: inactive"; then
docker swarm init
fi
# set the active env to our CLAMS_FQDN
cat >./project/clams-server/active_env.txt <<EOL
cat >./project/clams-server/active_env.txt <<EOL
${CLAMS_SERVER_FQDN}
EOL
# and we have to set our environment file as well.
cat > ./project/clams-server/environments/"$CLAMS_SERVER_FQDN" <<EOL
DOCKER_HOST=ssh://ubuntu@$CLAMS_SERVER_FQDN
DOCKER_HOST=ssh://ubuntu@${CLAMS_SERVER_FQDN}
DOMAIN_NAME=${PRIMARY_DOMAIN}
ENABLE_TLS=true
BTC_CHAIN=${BITCOIN_CHAIN}
CLN_COUNT=1
EOL
bash -c "./project/clams-server/up.sh -y"
bash -c "./project/clams-server/up.sh -y"
fi
fi