2022-05-20 15:06:41 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-03-02 14:46:17 +00:00
|
|
|
set -e
|
2023-02-01 19:44:05 +00:00
|
|
|
|
2023-03-05 16:49:06 +00:00
|
|
|
export DEPLOY_GHOST=true
|
2023-03-27 15:07:05 +00:00
|
|
|
export DEPLOY_CLAMS=false
|
2023-01-07 14:37:55 +00:00
|
|
|
|
2022-05-20 15:06:41 +00:00
|
|
|
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"
|
2023-02-01 19:44:05 +00:00
|
|
|
export CLAMS_HOSTNAME="clams"
|
2022-10-24 01:04:50 +00:00
|
|
|
|
2022-10-30 16:59:24 +00:00
|
|
|
export SITE_LANGUAGE_CODES="en"
|
2022-11-14 01:26:51 +00:00
|
|
|
export LANGUAGE_CODE="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"
|
2022-11-21 15:58:32 +00:00
|
|
|
export PASS_HOME="$HOME/.password-store"
|
2023-02-01 19:44:05 +00:00
|
|
|
|
2022-12-12 22:16:47 +00:00
|
|
|
|
|
|
|
export BTCPAY_SERVER_CPU_COUNT="4"
|
|
|
|
export BTCPAY_SERVER_MEMORY_MB="4096"
|
|
|
|
export WWW_SERVER_CPU_COUNT="4"
|
|
|
|
export WWW_SERVER_MEMORY_MB="4096"
|
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
|
|
|
|
|
2023-03-18 15:15:07 +00:00
|
|
|
DEFAULT_DB_IMAGE="mariadb:10.11.2-jammy"
|
2022-09-28 17:59:01 +00:00
|
|
|
|
2022-05-20 15:06:41 +00:00
|
|
|
|
|
|
|
# run the docker stack.
|
2023-03-11 03:40:50 +00:00
|
|
|
export GHOST_IMAGE="ghost:5.38.0"
|
2022-10-24 01:04:50 +00:00
|
|
|
|
2022-11-16 17:20:16 +00:00
|
|
|
# TODO switch to mysql. May require intricate export work for existing sites.
|
|
|
|
# THIS MUST BE COMPLETED BEFORE v1 RELEASE
|
2022-10-24 01:04:50 +00:00
|
|
|
#https://forum.ghost.org/t/how-to-migrate-from-mariadb-10-to-mysql-8/29575
|
2023-03-25 16:07:05 +00:00
|
|
|
export GHOST_DB_IMAGE="mysql:8.0.32"
|
2022-10-24 01:04:50 +00:00
|
|
|
|
|
|
|
|
2023-03-06 16:47:27 +00:00
|
|
|
export NGINX_IMAGE="nginx:1.23.3"
|
2022-10-22 00:04:03 +00:00
|
|
|
|
|
|
|
# version of backup is 24.0.3
|
2023-03-06 16:47:27 +00:00
|
|
|
export NEXTCLOUD_IMAGE="nextcloud:25.0.4"
|
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-11-14 01:23:48 +00:00
|
|
|
export NOSTR_RELAY_IMAGE="scsibug/nostr-rs-relay"
|
|
|
|
|
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
|
|
|
|
2023-03-15 23:21:02 +00:00
|
|
|
export SS_ROOT_PATH="$HOME/.ss"
|
|
|
|
|
2023-04-02 13:42:55 +00:00
|
|
|
export REMOTES_PATH="$SS_ROOT_PATH/remotes"
|
|
|
|
export PROJECTS_PATH="$SS_ROOT_PATH/projects"
|
2023-03-15 23:21:02 +00:00
|
|
|
export SITES_PATH="$SS_ROOT_PATH/sites"
|
2022-07-27 16:38:33 +00:00
|
|
|
|
2023-03-16 19:50:02 +00:00
|
|
|
# mount into ss-mgmt/home/ubuntu/snap/lxd/common/config
|
|
|
|
export LXD_CONFIG_PATH="$SS_ROOT_PATH/lxd"
|
|
|
|
|
2022-07-27 16:38:33 +00:00
|
|
|
# The base VM image.
|
2023-03-03 13:59:52 +00:00
|
|
|
export LXD_UBUNTU_BASE_VERSION="jammy"
|
2023-02-01 19:44:05 +00:00
|
|
|
export BASE_IMAGE_VM_NAME="ss-base-${LXD_UBUNTU_BASE_VERSION//./-}"
|
|
|
|
export BASE_LXC_IMAGE="ubuntu/$LXD_UBUNTU_BASE_VERSION/cloud"
|
2023-03-24 21:10:43 +00:00
|
|
|
WEEK_NUMBER=$(date +%U)
|
2023-03-27 15:07:42 +00:00
|
|
|
export UBUNTU_BASE_IMAGE_NAME="ss-ubuntu-${LXD_UBUNTU_BASE_VERSION//./-}"
|
2023-03-24 21:10:43 +00:00
|
|
|
|
2023-03-30 15:10:42 +00:00
|
|
|
export DOCKER_BASE_IMAGE_NAME="ss-docker-${LXD_UBUNTU_BASE_VERSION//./-}-$WEEK_NUMBER-A"
|
2022-07-27 16:38:33 +00:00
|
|
|
|
2022-09-09 18:00:07 +00:00
|
|
|
export OTHER_SITES_LIST=
|
2022-11-02 18:54:02 +00:00
|
|
|
export BTCPAY_ALT_NAMES=
|
2023-03-02 14:46:17 +00:00
|
|
|
export BITCOIN_CHAIN=regtest
|
2022-07-27 16:38:33 +00:00
|
|
|
export REMOTE_HOME="/home/ubuntu"
|
2023-04-02 13:42:55 +00:00
|
|
|
export REMOTE_DATA_PATH="/home/ubuntu/ss-data"
|
|
|
|
export BTCPAY_SERVER_APPPATH="$REMOTE_DATA_PATH/btcpayserver-docker"
|
2022-08-24 14:11:50 +00:00
|
|
|
|
|
|
|
# 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
|
2023-03-18 15:15:07 +00:00
|
|
|
export REGISTRY_URL="https://index.docker.io/v1"
|
2023-03-02 14:46:17 +00:00
|
|
|
export PRIMARY_DOMAIN=
|
2023-03-06 20:42:17 +00:00
|
|
|
|
2023-03-11 02:12:39 +00:00
|
|
|
# this is the git commit of the project/ sub git repo.
|
|
|
|
# used in the migration script to switch into past for backup
|
|
|
|
# then back to present (TARGET_PROJECT_GIT_COMMIT) for restore.
|
2023-03-27 15:07:52 +00:00
|
|
|
export TARGET_PROJECT_GIT_COMMIT=7a710d09162f98fa38e4c60fa00c87c8bcbeb5e9
|
2023-03-18 15:15:07 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
export TESTNET_BLOCK_HASH=00000000d8277ba1ca66b40b3e3476629e6f0f97c5b8cfaeabfe402e55db223a
|
|
|
|
export MAINNET_BLOCK_HASH=000000000000000000047941e3a6102e8896a4ae66b962599568eb25abd6b405
|
|
|
|
|
|
|
|
|
2023-03-18 15:11:12 +00:00
|
|
|
|
|
|
|
export SS_CACHE_PATH="$SS_ROOT_PATH/cache"
|
|
|
|
export SS_JAMMY_PATH="$SS_CACHE_PATH/$UBUNTU_BASE_IMAGE_NAME"
|