Stability improvements.

This commit is contained in:
Derek Smith 2023-03-06 11:47:27 -05:00
parent 8caae387b6
commit 7ce1f0adbe
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
9 changed files with 27 additions and 36 deletions

View File

@ -53,7 +53,7 @@ DEFAULT_DB_IMAGE="mariadb:10.9.3-jammy"
# run the docker stack. # run the docker stack.
export GHOST_IMAGE="ghost:5.26.2" export GHOST_IMAGE="ghost:5.37.0"
# TODO switch to mysql. May require intricate export work for existing sites. # TODO switch to mysql. May require intricate export work for existing sites.
# THIS MUST BE COMPLETED BEFORE v1 RELEASE # THIS MUST BE COMPLETED BEFORE v1 RELEASE
@ -61,10 +61,10 @@ export GHOST_IMAGE="ghost:5.26.2"
export GHOST_DB_IMAGE="$DEFAULT_DB_IMAGE" export GHOST_DB_IMAGE="$DEFAULT_DB_IMAGE"
export NGINX_IMAGE="nginx:1.23.2" export NGINX_IMAGE="nginx:1.23.3"
# version of backup is 24.0.3 # version of backup is 24.0.3
export NEXTCLOUD_IMAGE="nextcloud:25.0.2" export NEXTCLOUD_IMAGE="nextcloud:25.0.4"
export NEXTCLOUD_DB_IMAGE="$DEFAULT_DB_IMAGE" export NEXTCLOUD_DB_IMAGE="$DEFAULT_DB_IMAGE"
# TODO PIN the gitea version number. # TODO PIN the gitea version number.

View File

@ -1,13 +1,10 @@
#!/bin/bash #!/bin/bash
set -eu set -exu
cd "$(dirname "$0")" cd "$(dirname "$0")"
export DOCKER_HOST="ssh://ubuntu@$BTCPAY_FQDN" export DOCKER_HOST="ssh://ubuntu@$BTCPAY_FQDN"
docker pull btcpayserver/lightning:v22.11.1
docker build -t clightning:latest ./core-lightning
# run the btcpay setup script if it hasn't been done before. # run the btcpay setup script if it hasn't been done before.
if [ "$(ssh "$BTCPAY_FQDN" [[ ! -f "$REMOTE_HOME/btcpay.complete" ]]; echo $?)" -eq 0 ]; then if [ "$(ssh "$BTCPAY_FQDN" [[ ! -f "$REMOTE_HOME/btcpay.complete" ]]; echo $?)" -eq 0 ]; then
./stub_btcpay_setup.sh ./stub_btcpay_setup.sh

View File

@ -20,8 +20,7 @@ export CLIGHTNING_WEBSOCKET_PORT="$CLIGHTNING_WEBSOCKET_PORT"
# It also supports modern TLS, so SSL certs must be available. # It also supports modern TLS, so SSL certs must be available.
#opt-add-nostr-relay; #opt-add-nostr-relay;
export BTCPAYSERVER_GITREPO="https://github.com/farscapian/btcpayserver-docker" export BTCPAYSERVER_GITREPO="https://github.com/btcpayserver/btcpayserver-docker"
#https://github.com/btcpayserver/btcpayserver-docker
cat > "$SITE_PATH/btcpay.sh" <<EOL cat > "$SITE_PATH/btcpay.sh" <<EOL
#!/bin/bash #!/bin/bash

View File

@ -36,7 +36,7 @@ if [ ! -f "$CLUSTER_DEFINITION" ]; then
export LXD_CLUSTER_PASSWORD="$(gpg --gen-random --armor 1 14)" export LXD_CLUSTER_PASSWORD="$(gpg --gen-random --armor 1 14)"
export BITCOIN_CHAIN="regtest" export BITCOIN_CHAIN="regtest"
export PROJECT_PREFIX="dev" export PROJECT_PREFIX="dev"
#export REGISTRY_URL="https://index.docker.io/v1/" #export REGISTRY_URL=http://registry.domain.tld:5000
EOL EOL

View File

@ -13,8 +13,8 @@ DOMAIN_NAME=
RUN_CERT_RENEWAL=true RUN_CERT_RENEWAL=true
SKIP_WWW=false SKIP_WWW=false
RESTORE_WWW=false RESTORE_WWW=false
BACKUP_CERTS=false BACKUP_CERTS=true
BACKUP_APPS=false BACKUP_APPS=true
BACKUP_BTCPAY=true BACKUP_BTCPAY=true
BACKUP_BTCPAY_ARCHIVE_PATH= BACKUP_BTCPAY_ARCHIVE_PATH=
RESTORE_BTCPAY=false RESTORE_BTCPAY=false

View File

@ -19,7 +19,6 @@ fi
. ../defaults.sh . ../defaults.sh
. ./cluster_env.sh . ./cluster_env.sh
. ./project_env.sh . ./project_env.sh

View File

@ -94,6 +94,12 @@ if [ "$LXD_HOSTNAME" = "$BASE_IMAGE_VM_NAME" ]; then
UsePAM no UsePAM no
LogLevel INFO LogLevel INFO
- path: /etc/docker/daemon.json
content: |
{
"registry-mirrors": ["${REGISTRY_URL}"]
}
runcmd: runcmd:
- sudo mkdir -m 0755 -p /etc/apt/keyrings - sudo mkdir -m 0755 -p /etc/apt/keyrings
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
@ -104,6 +110,13 @@ if [ "$LXD_HOSTNAME" = "$BASE_IMAGE_VM_NAME" ]; then
EOF EOF
# - path: /etc/docker/daemon.json
# content: |
# {
# "registry-mirrors": "${REGISTRY_URL}",
# "labels": "githead=${LATEST_GIT_COMMIT}"
# }
#"labels": [githead="${LATEST_GIT_COMMIT}"]
# apt: # apt:
# sources: # sources:
@ -111,12 +124,7 @@ EOF
# source: "deb [arch=amd64] https://download.docker.com/linux/ubuntu ${LXD_UBUNTU_BASE_VERSION} stable" # source: "deb [arch=amd64] https://download.docker.com/linux/ubuntu ${LXD_UBUNTU_BASE_VERSION} stable"
# keyid: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 # keyid: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
# - path: /etc/docker/daemon.json
# content: |
# {
# "registry-mirrors": ["${REGISTRY_URL}"],
# "labels": [ "githead=${LATEST_GIT_COMMIT}" ]
# }
# - sudo apt-get update # - sudo apt-get update

View File

@ -3,15 +3,16 @@
set -eu set -eu
cd "$(dirname "$0")" cd "$(dirname "$0")"
# redirect all docker commands to the remote host.
DOCKER_HOST="ssh://ubuntu@$PRIMARY_WWW_FQDN"
export DOCKER_HOST="$DOCKER_HOST"
# prepare clams images and such # prepare clams images and such
./prepare_clams.sh ./prepare_clams.sh
# Create the nginx config file which covers all domains. # Create the nginx config file which covers all domains.
bash -c ./stub/nginx_config.sh bash -c ./stub/nginx_config.sh
# redirect all docker commands to the remote host.
export DOCKER_HOST="ssh://ubuntu@$PRIMARY_WWW_FQDN"
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
export DOMAIN_NAME="$DOMAIN_NAME" export DOMAIN_NAME="$DOMAIN_NAME"
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"

View File

@ -5,7 +5,6 @@ cd "$(dirname "$0")"
# deploy clams wallet. # deploy clams wallet.
LOCAL_CLAMS_REPO_PATH="$(pwd)/clams" LOCAL_CLAMS_REPO_PATH="$(pwd)/clams"
if [ ! -d "$LOCAL_CLAMS_REPO_PATH" ]; then if [ ! -d "$LOCAL_CLAMS_REPO_PATH" ]; then
git clone "$CLAMS_GIT_REPO" "$LOCAL_CLAMS_REPO_PATH" git clone "$CLAMS_GIT_REPO" "$LOCAL_CLAMS_REPO_PATH"
else else
@ -15,28 +14,16 @@ else
cd - cd -
fi fi
# # overwrite the clams/.env file with Sovereign Stack specific parameters.
# CLAMS_CONFIG_PATH="$LOCAL_CLAMS_REPO_PATH/.env"
# cat > "$CLAMS_CONFIG_PATH" <<EOF
# CLAMS_FQDN=${CLAMS_FQDN}
# BTC_CHAIN=${BITCOIN_CHAIN}
# DEPLOY_BTC_BACKEND=false
# EOF
# lxc file push -r -p "$LOCAL_CLAMS_REPO_PATH" "${PRIMARY_WWW_FQDN//./-}$REMOTE_HOME" # lxc file push -r -p "$LOCAL_CLAMS_REPO_PATH" "${PRIMARY_WWW_FQDN//./-}$REMOTE_HOME"
BROWSER_APP_GIT_TAG="1.5.0" BROWSER_APP_GIT_TAG="1.5.0"
BROWSER_APP_GIT_REPO_URL="https://github.com/clams-tech/browser-app" BROWSER_APP_GIT_REPO_URL="https://github.com/clams-tech/browser-app"
BROWSER_APP_IMAGE_NAME="browser-app:$BROWSER_APP_GIT_TAG" BROWSER_APP_IMAGE_NAME="browser-app:$BROWSER_APP_GIT_TAG"
# build the browser-app image. # build the browser-app image.
if ! docker image list --format "{{.Repository}}:{{.Tag}}" | grep -q "$BROWSER_APP_IMAGE_NAME"; then if ! docker image list --format "{{.Repository}}:{{.Tag}}" | grep -q "$BROWSER_APP_IMAGE_NAME"; then
docker build --build-arg GIT_REPO_URL="$BROWSER_APP_GIT_REPO_URL" \ docker build --build-arg GIT_REPO_URL="$BROWSER_APP_GIT_REPO_URL" \
--build-arg VERSION="$BROWSER_APP_GIT_TAG" \ --build-arg VERSION="$BROWSER_APP_GIT_TAG" \
-t "$BROWSER_APP_IMAGE_NAME" \ -t "$BROWSER_APP_IMAGE_NAME" \
./clams/frontend/browser-app/ $(pwd)/clams/frontend/browser-app/
fi fi
# If the clams-root volume doesn't exist, we create and seed it. # If the clams-root volume doesn't exist, we create and seed it.