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 VM_ID=w
if [ "$VIRTUAL_MACHINE" = btcpayserver ]; then if [ "$VIRTUAL_MACHINE" = btcpayserver ]; then
VM_ID="b" VM_ID="b"
elif [ "$VIRTUAL_MACHINE" = clamsserver ]; then
VM_ID="c"
fi fi
# d for docker; b for backup; s for ss-data # d for docker; b for backup; s for ss-data

View File

@ -73,6 +73,13 @@ if [ "$VIRTUAL_MACHINE" = btcpayserver ]; then
EOF 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 fi
. ./target.sh . ./target.sh

View File

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