From 3883cb4d66e12e35279d1e6ac138b91ee93fed3f Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Sat, 5 Nov 2022 19:50:59 -0400 Subject: [PATCH] Misc updates/whitespace. --- deployment/www/go.sh | 47 +++++++++++++--------------- deployment/www/stop_docker_stacks.sh | 2 ++ install.sh | 4 +++ 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/deployment/www/go.sh b/deployment/www/go.sh index 091f83d..a47cb4b 100755 --- a/deployment/www/go.sh +++ b/deployment/www/go.sh @@ -60,11 +60,6 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do echo "ERROR: Ensure NOSTR_ACCOUNT_PUBKEY is configured in your site_definition." exit 1 fi - - if [ -z "$NOSTR_ACCOUNT_PUBKEY" ]; then - echo "ERROR: Ensure NOSTR_ACCOUNT_PUBKEY is configured in your site_definition." - exit 1 - fi fi if [ -z "$DUPLICITY_BACKUP_PASSPHRASE" ]; then @@ -89,30 +84,30 @@ done ./stop_docker_stacks.sh -if [ "$DEPLOY_ONION_SITE" = true ]; then - # ensure the tor image is built - docker build -t tor:latest ./tor +# if [ "$DEPLOY_ONION_SITE" = true ]; then +# # ensure the tor image is built +# docker build -t tor:latest ./tor - # if the tor folder doesn't exist, we provision a new one. Otherwise you need to restore. - # this is how we generate a new torv3 endpoint. - if ! ssh "$PRIMARY_WWW_FQDN" "[ -d $REMOTE_HOME/tor/www ]"; then - ssh "$PRIMARY_WWW_FQDN" "mkdir -p $REMOTE_HOME/tor" - TOR_CONFIG_PATH="$(pwd)/tor/torrc-init" - export TOR_CONFIG_PATH="$TOR_CONFIG_PATH" - docker stack deploy -c ./tor.yml torstack - sleep 20 - docker stack rm torstack - sleep 20 - fi +# # if the tor folder doesn't exist, we provision a new one. Otherwise you need to restore. +# # this is how we generate a new torv3 endpoint. +# if ! ssh "$PRIMARY_WWW_FQDN" "[ -d $REMOTE_HOME/tor/www ]"; then +# ssh "$PRIMARY_WWW_FQDN" "mkdir -p $REMOTE_HOME/tor" +# TOR_CONFIG_PATH="$(pwd)/tor/torrc-init" +# export TOR_CONFIG_PATH="$TOR_CONFIG_PATH" +# docker stack deploy -c ./tor.yml torstack +# sleep 20 +# docker stack rm torstack +# sleep 20 +# fi - ONION_ADDRESS="$(ssh "$PRIMARY_WWW_FQDN" sudo cat "${REMOTE_HOME}"/tor/www/hostname)" - export ONION_ADDRESS="$ONION_ADDRESS" +# ONION_ADDRESS="$(ssh "$PRIMARY_WWW_FQDN" sudo cat "${REMOTE_HOME}"/tor/www/hostname)" +# export ONION_ADDRESS="$ONION_ADDRESS" - # # Since we run a separate ghost process, we create a new directory and symlink it to the original - # if ! ssh "$PRIMARY_WWW_FQDN" "[ -L $REMOTE_HOME/tor_ghost ]"; then - # ssh "$PRIMARY_WWW_FQDN" ln -s "$REMOTE_HOME/ghost_site/themes $REMOTE_HOME/tor_ghost/themes" - # fi -fi +# # # Since we run a separate ghost process, we create a new directory and symlink it to the original +# # if ! ssh "$PRIMARY_WWW_FQDN" "[ -L $REMOTE_HOME/tor_ghost ]"; then +# # ssh "$PRIMARY_WWW_FQDN" ln -s "$REMOTE_HOME/ghost_site/themes $REMOTE_HOME/tor_ghost/themes" +# # fi +# fi # nginx gets deployed first since it "owns" the docker networks of downstream services. ./stub/nginx_yml.sh diff --git a/deployment/www/stop_docker_stacks.sh b/deployment/www/stop_docker_stacks.sh index 2552b11..c539a0e 100755 --- a/deployment/www/stop_docker_stacks.sh +++ b/deployment/www/stop_docker_stacks.sh @@ -50,6 +50,8 @@ done if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then + sleep 2 + docker stack rm reverse-proxy if [ "$STOP_SERVICES" = true ]; then diff --git a/install.sh b/install.sh index 6ddf44e..cfe2441 100755 --- a/install.sh +++ b/install.sh @@ -16,6 +16,10 @@ fi sudo apt-get update +# TODO REVIEW management machine software requirements +# is docker-ce actually needed here? prefer to move docker registry +# to a host on SERVERS LAN so that it can operate +# TODO document which dependencies are required by what software, e.g., trezor, docker, etc. sudo apt-get install -y wait-for-it dnsutils rsync sshfs curl gnupg \ apt-transport-https ca-certificates lsb-release \ docker-ce-cli docker-ce containerd.io docker-compose-plugin \