2022-05-20 15:06:41 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2022-08-15 13:35:01 +00:00
|
|
|
export WWW_SERVER_MAC_ADDRESS=
|
2022-10-30 16:59:24 +00:00
|
|
|
export DEPLOY_WWW_SERVER=false
|
|
|
|
export DEPLOY_BTCPAY_SERVER=false
|
2022-05-20 15:06:41 +00:00
|
|
|
export DEPLOY_GHOST=true
|
2022-10-19 17:15:38 +00:00
|
|
|
export DEPLOY_NOSTR_RELAY=true
|
2022-05-20 15:06:41 +00:00
|
|
|
export DEPLOY_ONION_SITE=false
|
|
|
|
export DEPLOY_NEXTCLOUD=false
|
|
|
|
export DEPLOY_GITEA=false
|
|
|
|
|
|
|
|
export WWW_HOSTNAME="www"
|
2022-10-26 23:33:43 +00:00
|
|
|
export BTCPAY_HOSTNAME="btcpayserver"
|
|
|
|
export BTCPAY_HOSTNAME_IN_CERT="btcpay"
|
2022-05-20 15:06:41 +00:00
|
|
|
export NEXTCLOUD_HOSTNAME="nextcloud"
|
|
|
|
export GITEA_HOSTNAME="git"
|
2022-05-24 18:14:53 +00:00
|
|
|
export NOSTR_HOSTNAME="relay"
|
2022-10-24 01:04:50 +00:00
|
|
|
|
2022-10-30 16:59:24 +00:00
|
|
|
export SITE_LANGUAGE_CODES="en"
|
2022-05-20 15:06:41 +00:00
|
|
|
export NOSTR_ACCOUNT_PUBKEY=
|
|
|
|
|
|
|
|
# this is where the html is sourced from.
|
|
|
|
export SITE_HTML_PATH=
|
2022-05-28 03:07:17 +00:00
|
|
|
export BTCPAY_ADDITIONAL_HOSTNAMES=
|
2022-05-20 15:06:41 +00:00
|
|
|
|
|
|
|
export GHOST_MYSQL_PASSWORD=
|
|
|
|
export GHOST_MYSQL_ROOT_PASSWORD=
|
|
|
|
export NEXTCLOUD_MYSQL_PASSWORD=
|
|
|
|
export GITEA_MYSQL_PASSWORD=
|
|
|
|
export NEXTCLOUD_MYSQL_ROOT_PASSWORD=
|
|
|
|
export GITEA_MYSQL_ROOT_PASSWORD=
|
|
|
|
export DUPLICITY_BACKUP_PASSPHRASE=
|
|
|
|
#opt-add-fireflyiii;opt-add-zammad
|
2022-06-22 17:42:51 +00:00
|
|
|
|
|
|
|
|
2022-05-20 15:06:41 +00:00
|
|
|
export SSH_HOME="$HOME/.ssh"
|
|
|
|
export VLAN_INTERFACE=
|
2022-07-27 16:38:33 +00:00
|
|
|
export VM_NAME="sovereign-stack-base"
|
2022-05-20 15:06:41 +00:00
|
|
|
export DEV_MEMORY_MB="4096"
|
|
|
|
export DEV_CPU_COUNT="4"
|
2022-09-28 17:59:01 +00:00
|
|
|
|
2022-05-24 18:14:53 +00:00
|
|
|
export DOCKER_IMAGE_CACHE_FQDN="registry-1.docker.io"
|
2022-05-20 15:06:41 +00:00
|
|
|
|
|
|
|
export NEXTCLOUD_SPACE_GB=10
|
|
|
|
|
2022-05-28 03:07:17 +00:00
|
|
|
# first of all, if there are uncommited changes, we quit. You better stash or commit!
|
|
|
|
# Remote VPS instances are tagged with your current git HEAD so we know which code revision
|
|
|
|
# used when provisioning the VPS.
|
2022-09-09 18:00:07 +00:00
|
|
|
#LATEST_GIT_COMMIT="$(cat ./.git/refs/heads/master)"
|
|
|
|
#export LATEST_GIT_COMMIT="$LATEST_GIT_COMMIT"
|
2022-05-20 15:06:41 +00:00
|
|
|
|
2022-05-28 03:07:17 +00:00
|
|
|
# check if there are any uncommited changes. It's dangerous to instantiate VMs using
|
|
|
|
# code that hasn't been committed.
|
|
|
|
# if git update-index --refresh | grep -q "needs update"; then
|
|
|
|
# echo "ERROR: You have uncommited changes! Better stash your work with 'git stash'."
|
|
|
|
# exit 1
|
|
|
|
# fi
|
2022-05-20 15:06:41 +00:00
|
|
|
|
2022-06-22 17:42:51 +00:00
|
|
|
BTC_CHAIN=regtest
|
|
|
|
|
2022-05-20 15:06:41 +00:00
|
|
|
export BTC_CHAIN="$BTC_CHAIN"
|
|
|
|
|
2022-09-28 17:59:01 +00:00
|
|
|
DEFAULT_DB_IMAGE="mariadb:10.9.3-jammy"
|
|
|
|
|
2022-05-20 15:06:41 +00:00
|
|
|
|
|
|
|
# run the docker stack.
|
2022-10-26 23:33:43 +00:00
|
|
|
export GHOST_IMAGE="ghost:5.20.0"
|
2022-10-24 01:04:50 +00:00
|
|
|
|
|
|
|
# TODO switch to mysql. May require intricate export work. THIS MUST BE COMPLETED BEFORE v1 RELEASE
|
|
|
|
#https://forum.ghost.org/t/how-to-migrate-from-mariadb-10-to-mysql-8/29575
|
2022-05-20 15:06:41 +00:00
|
|
|
export GHOST_DB_IMAGE="$DEFAULT_DB_IMAGE"
|
2022-10-24 01:04:50 +00:00
|
|
|
|
|
|
|
|
2022-08-15 13:41:00 +00:00
|
|
|
export NGINX_IMAGE="nginx:1.23.1"
|
2022-10-22 00:04:03 +00:00
|
|
|
|
|
|
|
# version of backup is 24.0.3
|
|
|
|
export NEXTCLOUD_IMAGE="nextcloud:25.0.0"
|
2022-05-20 15:06:41 +00:00
|
|
|
export NEXTCLOUD_DB_IMAGE="$DEFAULT_DB_IMAGE"
|
|
|
|
|
2022-09-28 17:59:01 +00:00
|
|
|
# TODO PIN the gitea version number.
|
2022-05-20 15:06:41 +00:00
|
|
|
export GITEA_IMAGE="gitea/gitea:latest"
|
|
|
|
export GITEA_DB_IMAGE="$DEFAULT_DB_IMAGE"
|
|
|
|
|
2022-08-15 13:35:01 +00:00
|
|
|
export SOVEREIGN_STACK_MAC_ADDRESS=
|
2022-09-09 18:00:07 +00:00
|
|
|
export WWW_SERVER_MAC_ADDRESS=
|
|
|
|
export BTCPAYSERVER_MAC_ADDRESS=
|
2022-06-22 17:42:51 +00:00
|
|
|
|
|
|
|
export CLUSTERS_DIR="$HOME/ss-clusters"
|
2022-08-24 14:09:09 +00:00
|
|
|
export PROJECTS_DIR="$HOME/ss-projects"
|
2022-06-22 17:42:51 +00:00
|
|
|
export SITES_PATH="$HOME/ss-sites"
|
2022-07-27 16:38:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
# The base VM image.
|
|
|
|
export BASE_LXC_IMAGE="ubuntu/22.04/cloud"
|
|
|
|
|
|
|
|
# Deploy a registry cache on your management machine.
|
2022-10-30 16:59:24 +00:00
|
|
|
export DEPLOY_MGMT_REGISTRY=false
|
2022-09-09 18:00:07 +00:00
|
|
|
export OTHER_SITES_LIST=
|
2022-07-27 16:38:33 +00:00
|
|
|
|
|
|
|
export REMOTE_HOME="/home/ubuntu"
|
|
|
|
|
|
|
|
export BTCPAY_SERVER_APPPATH="$REMOTE_HOME/btcpayserver-docker"
|
2022-08-24 14:11:50 +00:00
|
|
|
export REMOTE_CERT_BASE_DIR="$REMOTE_HOME/.certs"
|
|
|
|
|
|
|
|
# this space is for OS, docker images, etc. DOES NOT INCLUDE USER DATA.
|
2022-10-22 00:04:03 +00:00
|
|
|
export ROOT_DISK_SIZE_GB=20
|