diff --git a/defaults.sh b/defaults.sh index ea68118..69c0344 100755 --- a/defaults.sh +++ b/defaults.sh @@ -2,7 +2,6 @@ set -e - export DEPLOY_GHOST=true export DEPLOY_CLAMS=true @@ -16,7 +15,6 @@ export NEXTCLOUD_HOSTNAME="nextcloud" export GITEA_HOSTNAME="git" export NOSTR_HOSTNAME="relay" export CLAMS_HOSTNAME="clams" -export CLAMS_GIT_REPO="https://github.com/farscapian/clams-app-docker.git" export SITE_LANGUAGE_CODES="en" export LANGUAGE_CODE="en" diff --git a/deployment/check_dependencies.sh b/deployment/check_dependencies.sh deleted file mode 100755 index a42be9f..0000000 --- a/deployment/check_dependencies.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -eu -cd "$(dirname "$0")" - - -check_dependencies () { - for cmd in "$@"; do - if ! command -v "$cmd" >/dev/null 2>&1; then - echo "This script requires \"${cmd}\" to be installed. Please run 'install.sh'." - exit 1 - fi - done -} - -# Check system's dependencies -check_dependencies wait-for-it dig rsync sshfs lxc - -# let's check to ensure the management machine is on the Baseline ubuntu 21.04 -if ! lsb_release -d | grep -q "Ubuntu 22.04"; then - echo "ERROR: Your machine is not running the Ubuntu 22.04 LTS baseline OS on your management machine." - exit 1 -fi diff --git a/deployment/check_environment.sh b/deployment/check_environment.sh deleted file mode 100755 index d4d8bf1..0000000 --- a/deployment/check_environment.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -ex - -if lxc remote get-default | grep -q "production"; then - echo "WARNING: You are running command against a production system!" - echo "" - - # check if there are any uncommited changes. It's dangerous to - # alter production systems when you have commits to make or changes to stash. - if git update-index --refresh | grep -q "needs update"; then - echo "ERROR: You have uncommited changes! You MUST commit or stash all changes to continue." - exit 1 - fi - - RESPONSE= - read -r -p " Are you sure you want to continue (y) ": RESPONSE - if [ "$RESPONSE" != "y" ]; then - echo "STOPPING." - exit 1 - fi - -fi diff --git a/deployment/migrate.sh b/deployment/migrate.sh index 6f8f5ce..78c5d28 100755 --- a/deployment/migrate.sh +++ b/deployment/migrate.sh @@ -44,10 +44,10 @@ echo "INFO: The BTCPAY_RESTORE_ARCHIVE_PATH for this migration will be: $BTCPAY_ # by default, we grab a backup. # run deploy which backups up everything, but doesnt restart any services. -bash -c "./deploy.sh --stop --no-cert-renew --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH" +bash -c "./project/deploy.sh --stop --no-cert-renew --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH" # call the destroy script. If user proceed, then user data is DESTROYED! USER_SAYS_YES="$USER_SAYS_YES" ./destroy.sh # Then we can run a restore operation and specify the backup archive at the CLI. -bash -c "./deploy.sh -y --restore-www --restore-btcpay --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH" +bash -c "./project/deploy.sh -y --restore-www --restore-btcpay --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH" diff --git a/deployment/btcpayserver/.gitignore b/deployment/project/btcpayserver/.gitignore similarity index 100% rename from deployment/btcpayserver/.gitignore rename to deployment/project/btcpayserver/.gitignore diff --git a/deployment/btcpayserver/backup_btcpay.sh b/deployment/project/btcpayserver/backup_btcpay.sh similarity index 100% rename from deployment/btcpayserver/backup_btcpay.sh rename to deployment/project/btcpayserver/backup_btcpay.sh diff --git a/deployment/btcpayserver/bashrc.txt b/deployment/project/btcpayserver/bashrc.txt similarity index 100% rename from deployment/btcpayserver/bashrc.txt rename to deployment/project/btcpayserver/bashrc.txt diff --git a/deployment/btcpayserver/go.sh b/deployment/project/btcpayserver/go.sh similarity index 100% rename from deployment/btcpayserver/go.sh rename to deployment/project/btcpayserver/go.sh diff --git a/deployment/btcpayserver/remote_scripts/btcpay-backup.sh b/deployment/project/btcpayserver/remote_scripts/btcpay-backup.sh similarity index 100% rename from deployment/btcpayserver/remote_scripts/btcpay-backup.sh rename to deployment/project/btcpayserver/remote_scripts/btcpay-backup.sh diff --git a/deployment/btcpayserver/remote_scripts/btcpay-restore.sh b/deployment/project/btcpayserver/remote_scripts/btcpay-restore.sh similarity index 100% rename from deployment/btcpayserver/remote_scripts/btcpay-restore.sh rename to deployment/project/btcpayserver/remote_scripts/btcpay-restore.sh diff --git a/deployment/btcpayserver/restore.sh b/deployment/project/btcpayserver/restore.sh similarity index 100% rename from deployment/btcpayserver/restore.sh rename to deployment/project/btcpayserver/restore.sh diff --git a/deployment/btcpayserver/stub_btcpay_setup.sh b/deployment/project/btcpayserver/stub_btcpay_setup.sh similarity index 100% rename from deployment/btcpayserver/stub_btcpay_setup.sh rename to deployment/project/btcpayserver/stub_btcpay_setup.sh diff --git a/deployment/create_lxc_base.sh b/deployment/project/create_lxc_base.sh similarity index 99% rename from deployment/create_lxc_base.sh rename to deployment/project/create_lxc_base.sh index 848477a..7e6b25d 100755 --- a/deployment/create_lxc_base.sh +++ b/deployment/project/create_lxc_base.sh @@ -5,7 +5,6 @@ cd "$(dirname "$0")" ./stub_lxc_profile.sh "$BASE_IMAGE_VM_NAME" - # let's download our base image. if ! lxc image list --format csv --columns l | grep -q "$UBUNTU_BASE_IMAGE_NAME"; then # if the image doesn't exist, download it from Ubuntu's image server diff --git a/deployment/deploy.sh b/deployment/project/deploy.sh similarity index 71% rename from deployment/deploy.sh rename to deployment/project/deploy.sh index 29eb3dd..d2a2b54 100755 --- a/deployment/deploy.sh +++ b/deployment/project/deploy.sh @@ -3,11 +3,37 @@ set -ex cd "$(dirname "$0")" -LATEST_GIT_COMMIT="$(cat ../.git/refs/heads/master)" +LATEST_GIT_COMMIT="$(cat ../../.git/refs/heads/master)" export LATEST_GIT_COMMIT="$LATEST_GIT_COMMIT" -./check_dependencies.sh -./check_environment.sh +# check to ensure dependencies are met. +for cmd in wait-for-it dig rsync sshfs lxc; do + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "This script requires \"${cmd}\" to be installed. Please run 'install.sh'." + exit 1 + fi +done + +# do a spot check; if we are on production warn. +if lxc remote get-default | grep -q "production"; then + echo "WARNING: You are running command against a production system!" + echo "" + + # check if there are any uncommited changes. It's dangerous to + # alter production systems when you have commits to make or changes to stash. + if git update-index --refresh | grep -q "needs update"; then + echo "ERROR: You have uncommited changes! You MUST commit or stash all changes to continue." + exit 1 + fi + + RESPONSE= + read -r -p " Are you sure you want to continue (y) ": RESPONSE + if [ "$RESPONSE" != "y" ]; then + echo "STOPPING." + exit 1 + fi + +fi DOMAIN_NAME= RUN_CERT_RENEWAL=true @@ -109,7 +135,7 @@ if [ "$RESTORE_BTCPAY" = true ] && [ -z "$BACKUP_BTCPAY_ARCHIVE_PATH" ]; then fi # set up our default paths. -source ../defaults.sh +source ../../defaults.sh export DOMAIN_NAME="$DOMAIN_NAME" export REGISTRY_DOCKER_IMAGE="registry:2" @@ -153,122 +179,6 @@ function new_pass { gpg --gen-random --armor 1 25 } -function instantiate_vms { - - export UPDATE_BTCPAY="$UPDATE_BTCPAY" - export RECONFIGURE_BTCPAY_SERVER="$RECONFIGURE_BTCPAY_SERVER" - - # iterate over all our server endpoints and provision them if needed. - # www - VPS_HOSTNAME= - - for VIRTUAL_MACHINE in www btcpayserver; do - export VIRTUAL_MACHINE="$VIRTUAL_MACHINE" - FQDN= - - export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" - - source "$SITE_PATH/site_definition" - source ./domain_env.sh - - # VALIDATE THE INPUT from the ENVFILE - if [ -z "$DOMAIN_NAME" ]; then - echo "ERROR: DOMAIN_NAME not specified. Use the --domain-name= option." - exit 1 - fi - - # # switch to the default project - # if ! lxc project list --format csv | grep -a "default (current)"; then - # lxc project switch default - # fi - - # Goal is to get the macvlan interface. - LXD_SS_CONFIG_LINE= - if lxc network list --format csv | grep lxdbr0 | grep -q ss-config; then - LXD_SS_CONFIG_LINE="$(lxc network list --format csv | grep lxdbr0 | grep ss-config)" - fi - - if [ -z "$LXD_SS_CONFIG_LINE" ]; then - echo "ERROR: the MACVLAN interface has not been specified. You may need to run ss-cluster again." - exit 1 - fi - - CONFIG_ITEMS="$(echo "$LXD_SS_CONFIG_LINE" | awk -F'"' '{print $2}')" - DATA_PLANE_MACVLAN_INTERFACE="$(echo "$CONFIG_ITEMS" | cut -d ',' -f2)" - export DATA_PLANE_MACVLAN_INTERFACE="$DATA_PLANE_MACVLAN_INTERFACE" - - - # # switch to the default project to ensure the base image is created. - # if ! lxc project list --format csv | grep -a "default (current)"; then - # lxc project switch default - # fi - - # create the lxd base image. - ./create_lxc_base.sh - - # # now switch to the current chain project. - # if ! lxc project list --format csv | grep -a "$BITCOIN_CHAIN"; then - # lxc project switch "$BITCOIN_CHAIN" - # fi - - export MAC_ADDRESS_TO_PROVISION= - export VPS_HOSTNAME="$VPS_HOSTNAME" - export FQDN="$VPS_HOSTNAME.$DOMAIN_NAME" - - DDNS_HOST= - - if [ "$VIRTUAL_MACHINE" = www ]; then - if [ "$SKIP_WWW" = true ]; then - echo "INFO: Skipping WWW due to command line argument." - continue - fi - - VPS_HOSTNAME="$WWW_HOSTNAME" - MAC_ADDRESS_TO_PROVISION="$WWW_SERVER_MAC_ADDRESS" - DDNS_HOST="$WWW_HOSTNAME" - ROOT_DISK_SIZE_GB="$((ROOT_DISK_SIZE_GB + NEXTCLOUD_SPACE_GB))" - elif [ "$VIRTUAL_MACHINE" = btcpayserver ] || [ "$SKIP_BTCPAY" = true ]; then - - - DDNS_HOST="$BTCPAY_HOSTNAME" - VPS_HOSTNAME="$BTCPAY_HOSTNAME" - MAC_ADDRESS_TO_PROVISION="$BTCPAYSERVER_MAC_ADDRESS" - if [ "$BITCOIN_CHAIN" = mainnet ]; then - ROOT_DISK_SIZE_GB=150 - elif [ "$BITCOIN_CHAIN" = testnet ]; then - ROOT_DISK_SIZE_GB=70 - fi - - elif [ "$VIRTUAL_MACHINE" = "$BASE_IMAGE_VM_NAME" ]; then - DDNS_HOST="$BASE_IMAGE_VM_NAME" - ROOT_DISK_SIZE_GB=8 - else - echo "ERROR: VIRTUAL_MACHINE not within allowable bounds." - exit - fi - - export DDNS_HOST="$DDNS_HOST" - export FQDN="$DDNS_HOST.$DOMAIN_NAME" - export LXD_VM_NAME="${FQDN//./-}" - export VIRTUAL_MACHINE="$VIRTUAL_MACHINE" - export REMOTE_CERT_DIR="$REMOTE_CERT_BASE_DIR/$FQDN" - export MAC_ADDRESS_TO_PROVISION="$MAC_ADDRESS_TO_PROVISION" - - ./deploy_vms.sh - - if [ "$VIRTUAL_MACHINE" = www ]; then - # this tells our local docker client to target the remote endpoint via SSH - export DOCKER_HOST="ssh://ubuntu@$PRIMARY_WWW_FQDN" - - # enable docker swarm mode so we can support docker stacks. - if docker info | grep -q "Swarm: inactive"; then - docker swarm init --advertise-addr enp6s0 - fi - fi - done - -} - function stub_site_definition { mkdir -p "$SITE_PATH" "$PROJECT_PATH/sites" @@ -403,7 +313,118 @@ export PRIMARY_WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME" stub_site_definition # bring the VMs up under the primary domain name. -instantiate_vms + +export UPDATE_BTCPAY="$UPDATE_BTCPAY" +export RECONFIGURE_BTCPAY_SERVER="$RECONFIGURE_BTCPAY_SERVER" + +# iterate over all our server endpoints and provision them if needed. +# www +VPS_HOSTNAME= + +for VIRTUAL_MACHINE in www btcpayserver; do + export VIRTUAL_MACHINE="$VIRTUAL_MACHINE" + FQDN= + + export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" + + source "$SITE_PATH/site_definition" + source ./domain_env.sh + + # VALIDATE THE INPUT from the ENVFILE + if [ -z "$DOMAIN_NAME" ]; then + echo "ERROR: DOMAIN_NAME not specified. Use the --domain-name= option." + exit 1 + fi + + # # switch to the default project + # if ! lxc project list --format csv | grep -a "default (current)"; then + # lxc project switch default + # fi + + # Goal is to get the macvlan interface. + LXD_SS_CONFIG_LINE= + if lxc network list --format csv | grep lxdbr0 | grep -q ss-config; then + LXD_SS_CONFIG_LINE="$(lxc network list --format csv | grep lxdbr0 | grep ss-config)" + fi + + if [ -z "$LXD_SS_CONFIG_LINE" ]; then + echo "ERROR: the MACVLAN interface has not been specified. You may need to run ss-cluster again." + exit 1 + fi + + CONFIG_ITEMS="$(echo "$LXD_SS_CONFIG_LINE" | awk -F'"' '{print $2}')" + DATA_PLANE_MACVLAN_INTERFACE="$(echo "$CONFIG_ITEMS" | cut -d ',' -f2)" + export DATA_PLANE_MACVLAN_INTERFACE="$DATA_PLANE_MACVLAN_INTERFACE" + + + # # switch to the default project to ensure the base image is created. + # if ! lxc project list --format csv | grep -a "default (current)"; then + # lxc project switch default + # fi + + # create the lxd base image. + ./create_lxc_base.sh + + # # now switch to the current chain project. + # if ! lxc project list --format csv | grep -a "$BITCOIN_CHAIN"; then + # lxc project switch "$BITCOIN_CHAIN" + # fi + + export MAC_ADDRESS_TO_PROVISION= + export VPS_HOSTNAME="$VPS_HOSTNAME" + export FQDN="$VPS_HOSTNAME.$DOMAIN_NAME" + + DDNS_HOST= + + if [ "$VIRTUAL_MACHINE" = www ]; then + if [ "$SKIP_WWW" = true ]; then + echo "INFO: Skipping WWW due to command line argument." + continue + fi + + VPS_HOSTNAME="$WWW_HOSTNAME" + MAC_ADDRESS_TO_PROVISION="$WWW_SERVER_MAC_ADDRESS" + DDNS_HOST="$WWW_HOSTNAME" + ROOT_DISK_SIZE_GB="$((ROOT_DISK_SIZE_GB + NEXTCLOUD_SPACE_GB))" + elif [ "$VIRTUAL_MACHINE" = btcpayserver ] || [ "$SKIP_BTCPAY" = true ]; then + + + DDNS_HOST="$BTCPAY_HOSTNAME" + VPS_HOSTNAME="$BTCPAY_HOSTNAME" + MAC_ADDRESS_TO_PROVISION="$BTCPAYSERVER_MAC_ADDRESS" + if [ "$BITCOIN_CHAIN" = mainnet ]; then + ROOT_DISK_SIZE_GB=150 + elif [ "$BITCOIN_CHAIN" = testnet ]; then + ROOT_DISK_SIZE_GB=70 + fi + + elif [ "$VIRTUAL_MACHINE" = "$BASE_IMAGE_VM_NAME" ]; then + DDNS_HOST="$BASE_IMAGE_VM_NAME" + ROOT_DISK_SIZE_GB=8 + else + echo "ERROR: VIRTUAL_MACHINE not within allowable bounds." + exit + fi + + export DDNS_HOST="$DDNS_HOST" + export FQDN="$DDNS_HOST.$DOMAIN_NAME" + export LXD_VM_NAME="${FQDN//./-}" + export VIRTUAL_MACHINE="$VIRTUAL_MACHINE" + export REMOTE_CERT_DIR="$REMOTE_CERT_BASE_DIR/$FQDN" + export MAC_ADDRESS_TO_PROVISION="$MAC_ADDRESS_TO_PROVISION" + + ./deploy_vms.sh + + if [ "$VIRTUAL_MACHINE" = www ]; then + # this tells our local docker client to target the remote endpoint via SSH + export DOCKER_HOST="ssh://ubuntu@$PRIMARY_WWW_FQDN" + + # enable docker swarm mode so we can support docker stacks. + if docker info | grep -q "Swarm: inactive"; then + docker swarm init --advertise-addr enp6s0 + fi + fi + done # let's stub out the rest of our site definitions, if any. for DOMAIN_NAME in ${OTHER_SITES_LIST//,/ }; do @@ -417,7 +438,7 @@ done # now let's run the www and btcpay-specific provisioning scripts. if [ "$SKIP_WWW" = false ]; then - bash -c "./www/go.sh" + ./www/go.sh ssh ubuntu@"$PRIMARY_WWW_FQDN" "echo $LATEST_GIT_COMMIT > /home/ubuntu/.ss-githead" fi diff --git a/deployment/deploy_vms.sh b/deployment/project/deploy_vms.sh similarity index 100% rename from deployment/deploy_vms.sh rename to deployment/project/deploy_vms.sh diff --git a/deployment/domain_env.sh b/deployment/project/domain_env.sh similarity index 99% rename from deployment/domain_env.sh rename to deployment/project/domain_env.sh index 1917a3b..c2ee5fb 100755 --- a/deployment/domain_env.sh +++ b/deployment/project/domain_env.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -ex export NEXTCLOUD_FQDN="$NEXTCLOUD_HOSTNAME.$DOMAIN_NAME" export BTCPAY_FQDN="$BTCPAY_HOSTNAME.$DOMAIN_NAME" diff --git a/deployment/stub_lxc_profile.sh b/deployment/project/stub_lxc_profile.sh similarity index 100% rename from deployment/stub_lxc_profile.sh rename to deployment/project/stub_lxc_profile.sh diff --git a/deployment/wait_for_lxc_ip.sh b/deployment/project/wait_for_lxc_ip.sh similarity index 100% rename from deployment/wait_for_lxc_ip.sh rename to deployment/project/wait_for_lxc_ip.sh diff --git a/deployment/www/.gitignore b/deployment/project/www/.gitignore similarity index 100% rename from deployment/www/.gitignore rename to deployment/project/www/.gitignore diff --git a/deployment/www/backup_path.sh b/deployment/project/www/backup_path.sh similarity index 100% rename from deployment/www/backup_path.sh rename to deployment/project/www/backup_path.sh diff --git a/deployment/www/generate_certs.sh b/deployment/project/www/generate_certs.sh similarity index 98% rename from deployment/www/generate_certs.sh rename to deployment/project/www/generate_certs.sh index acd6d5b..6900552 100755 --- a/deployment/www/generate_certs.sh +++ b/deployment/project/www/generate_certs.sh @@ -11,7 +11,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../defaults.sh + source ../../../defaults.sh source "$SITE_PATH/site_definition" source ../domain_env.sh diff --git a/deployment/www/go.sh b/deployment/project/www/go.sh similarity index 98% rename from deployment/www/go.sh rename to deployment/project/www/go.sh index ac01811..ea5f5b9 100755 --- a/deployment/www/go.sh +++ b/deployment/project/www/go.sh @@ -18,7 +18,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../defaults.sh + source ../../../defaults.sh source "$SITE_PATH/site_definition" source ../domain_env.sh @@ -109,7 +109,7 @@ if [ "$RESTART_FRONT_END" = true ]; then export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../defaults.sh + source ../../../defaults.sh source "$SITE_PATH/site_definition" source ../domain_env.sh diff --git a/deployment/www/prepare_clams.sh b/deployment/project/www/prepare_clams.sh similarity index 94% rename from deployment/www/prepare_clams.sh rename to deployment/project/www/prepare_clams.sh index 33a3276..d8f9ce2 100755 --- a/deployment/www/prepare_clams.sh +++ b/deployment/project/www/prepare_clams.sh @@ -5,8 +5,10 @@ cd "$(dirname "$0")" # deploy clams wallet. LOCAL_CLAMS_REPO_PATH="$(pwd)/clams" +BROWSER_APP_GIT_TAG="1.5.0" +BROWSER_APP_GIT_REPO_URL="https://github.com/clams-tech/browser-app" if [ ! -d "$LOCAL_CLAMS_REPO_PATH" ]; then - git clone "$CLAMS_GIT_REPO" "$LOCAL_CLAMS_REPO_PATH" + git clone "$BROWSER_APP_GIT_REPO_URL" "$LOCAL_CLAMS_REPO_PATH" else cd "$LOCAL_CLAMS_REPO_PATH" git config --global pull.rebase false @@ -15,8 +17,6 @@ else fi # lxc file push -r -p "$LOCAL_CLAMS_REPO_PATH" "${PRIMARY_WWW_FQDN//./-}$REMOTE_HOME" -BROWSER_APP_GIT_TAG="1.5.0" -BROWSER_APP_GIT_REPO_URL="https://github.com/clams-tech/browser-app" BROWSER_APP_IMAGE_NAME="browser-app:$BROWSER_APP_GIT_TAG" # build the browser-app image. if ! docker image list --format "{{.Repository}}:{{.Tag}}" | grep -q "$BROWSER_APP_IMAGE_NAME"; then diff --git a/deployment/www/restore_path.sh b/deployment/project/www/restore_path.sh similarity index 100% rename from deployment/www/restore_path.sh rename to deployment/project/www/restore_path.sh diff --git a/deployment/www/stop_docker_stacks.sh b/deployment/project/www/stop_docker_stacks.sh similarity index 98% rename from deployment/www/stop_docker_stacks.sh rename to deployment/project/www/stop_docker_stacks.sh index 4827200..b5f48e6 100755 --- a/deployment/www/stop_docker_stacks.sh +++ b/deployment/project/www/stop_docker_stacks.sh @@ -9,7 +9,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../defaults.sh + source ../../../defaults.sh source "$SITE_PATH/site_definition" source ../domain_env.sh diff --git a/deployment/www/stub/ghost_yml.sh b/deployment/project/www/stub/ghost_yml.sh similarity index 99% rename from deployment/www/stub/ghost_yml.sh rename to deployment/project/www/stub/ghost_yml.sh index 1ca52c9..e0683fb 100755 --- a/deployment/www/stub/ghost_yml.sh +++ b/deployment/project/www/stub/ghost_yml.sh @@ -8,7 +8,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../../defaults.sh + source ../../../../defaults.sh source "$SITE_PATH/site_definition" source ../../domain_env.sh diff --git a/deployment/www/stub/gitea_yml.sh b/deployment/project/www/stub/gitea_yml.sh similarity index 98% rename from deployment/www/stub/gitea_yml.sh rename to deployment/project/www/stub/gitea_yml.sh index 4c8d84b..910b27c 100755 --- a/deployment/www/stub/gitea_yml.sh +++ b/deployment/project/www/stub/gitea_yml.sh @@ -8,7 +8,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../../defaults.sh + source ../../../../defaults.sh source "$SITE_PATH/site_definition" source ../../domain_env.sh diff --git a/deployment/www/stub/nextcloud_yml.sh b/deployment/project/www/stub/nextcloud_yml.sh similarity index 98% rename from deployment/www/stub/nextcloud_yml.sh rename to deployment/project/www/stub/nextcloud_yml.sh index a140666..c3d9ed4 100755 --- a/deployment/www/stub/nextcloud_yml.sh +++ b/deployment/project/www/stub/nextcloud_yml.sh @@ -8,7 +8,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../../defaults.sh + source ../../../../defaults.sh source "$SITE_PATH/site_definition" source ../../domain_env.sh diff --git a/deployment/www/stub/nginx_config.sh b/deployment/project/www/stub/nginx_config.sh similarity index 99% rename from deployment/www/stub/nginx_config.sh rename to deployment/project/www/stub/nginx_config.sh index f10a53c..8a53273 100755 --- a/deployment/www/stub/nginx_config.sh +++ b/deployment/project/www/stub/nginx_config.sh @@ -18,8 +18,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do export CONTAINER_TLS_PATH="/etc/letsencrypt/${DOMAIN_NAME}/live/${DOMAIN_NAME}" # source the site path so we know what features it has. - echo "BEFORE" - source ../../../defaults.sh + source ../../../../defaults.sh source "$SITE_PATH/site_definition" source ../../domain_env.sh echo "after" diff --git a/deployment/www/stub/nginx_yml.sh b/deployment/project/www/stub/nginx_yml.sh similarity index 97% rename from deployment/www/stub/nginx_yml.sh rename to deployment/project/www/stub/nginx_yml.sh index 9702703..e149ee9 100755 --- a/deployment/www/stub/nginx_yml.sh +++ b/deployment/project/www/stub/nginx_yml.sh @@ -23,7 +23,7 @@ EOL export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../../defaults.sh + source ../../../../defaults.sh source "$SITE_PATH/site_definition" source ../../domain_env.sh @@ -96,7 +96,7 @@ EOL export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../../defaults.sh + source ../../../../defaults.sh source "$SITE_PATH/site_definition" source ../../domain_env.sh diff --git a/deployment/www/stub/nostr_yml.sh b/deployment/project/www/stub/nostr_yml.sh similarity index 98% rename from deployment/www/stub/nostr_yml.sh rename to deployment/project/www/stub/nostr_yml.sh index ceb51e8..6162fb1 100755 --- a/deployment/www/stub/nostr_yml.sh +++ b/deployment/project/www/stub/nostr_yml.sh @@ -10,7 +10,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" # source the site path so we know what features it has. - source ../../../defaults.sh + source ../../../../defaults.sh source "$SITE_PATH/site_definition" source ../../domain_env.sh diff --git a/deployment/www/tor/Dockerfile b/deployment/project/www/tor/Dockerfile similarity index 100% rename from deployment/www/tor/Dockerfile rename to deployment/project/www/tor/Dockerfile diff --git a/deployment/www/tor/torrc b/deployment/project/www/tor/torrc similarity index 100% rename from deployment/www/tor/torrc rename to deployment/project/www/tor/torrc diff --git a/deployment/www/tor/torrc-init b/deployment/project/www/tor/torrc-init similarity index 100% rename from deployment/www/tor/torrc-init rename to deployment/project/www/tor/torrc-init diff --git a/management/bash_profile b/management/bash_profile index 3ecf9bd..677deeb 100644 --- a/management/bash_profile +++ b/management/bash_profile @@ -1,6 +1,6 @@ #!/bin/bash -alias ss-deploy='/home/ubuntu/sovereign-stack/deployment/deploy.sh $@' +alias ss-deploy='/home/ubuntu/sovereign-stack/deployment/project/deploy.sh $@' alias ss-cluster='/home/ubuntu/sovereign-stack/deployment/cluster.sh $@' alias ss-show='/home/ubuntu/sovereign-stack/deployment/show.sh $@' alias ss-reset='/home/ubuntu/sovereign-stack/deployment/reset.sh $@'