Rename to site.conf

This commit is contained in:
Derek Smith 2023-03-13 14:43:23 -04:00
commit a458394ad8
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
10 changed files with 50 additions and 53 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -ex
cd "$(dirname "$0")" cd "$(dirname "$0")"
LATEST_GIT_COMMIT="$(cat ./.git/refs/heads/main)" LATEST_GIT_COMMIT="$(cat ./.git/refs/heads/main)"
@ -234,16 +234,13 @@ for PROJECT_CHAIN in ${DEPLOYMENT_STRING//,/ }; do
ln -s "$PROJECT_PATH" "$REMOTE_PATH/projects/$PROJECT_NAME" ln -s "$PROJECT_PATH" "$REMOTE_PATH/projects/$PROJECT_NAME"
fi fi
# check to see if the enf file exists. exist if not. # check to see if the enf file exists. exist if not.
PROJECT_DEFINITION_PATH="$PROJECT_PATH/project.conf" PROJECT_DEFINITION_PATH="$PROJECT_PATH/project_definition"
if [ ! -f "$PROJECT_DEFINITION_PATH" ]; then if [ ! -f "$PROJECT_DEFINITION_PATH" ]; then
# stub out a project.conf # stub out a project_definition
cat >"$PROJECT_DEFINITION_PATH" <<EOL cat >"$PROJECT_DEFINITION_PATH" <<EOL
# see https://www.sovereign-stack.org/ss-deploy for more info. #!/bin/bash
PRIMARY_DOMAIN=
# OTHER_SITES_LIST="domain1.tld,domain2.tld,domain3.tld"
WWW_SERVER_MAC_ADDRESS= WWW_SERVER_MAC_ADDRESS=
# WWW_SERVER_CPU_COUNT="6" # WWW_SERVER_CPU_COUNT="6"
@ -256,7 +253,7 @@ BTCPAYSERVER_MAC_ADDRESS=
EOL EOL
chmod 0744 "$PROJECT_DEFINITION_PATH" chmod 0744 "$PROJECT_DEFINITION_PATH"
echo "INFO: we stubbed a new 'project.conf' for you at '$PROJECT_DEFINITION_PATH'. Go update it!" echo "INFO: we stubbed a new project_defition for you at '$PROJECT_DEFINITION_PATH'. Go update it!"
echo "INFO: Learn more at https://www.sovereign-stack.org/ss-deploy/" echo "INFO: Learn more at https://www.sovereign-stack.org/ss-deploy/"
exit 1 exit 1
@ -265,21 +262,21 @@ EOL
# source project defition. # source project defition.
source "$PROJECT_DEFINITION_PATH" source "$PROJECT_DEFINITION_PATH"
if [ -z "$PRIMARY_DOMAIN" ]; then if [ -z "$PRIMARY_DOMAIN" ]; then
echo "ERROR: The PRIMARY_DOMAIN is not specified. Check your 'project.conf'." echo "ERROR: The PRIMARY_DOMAIN is not specified. Check your project_definition."
exit 1 exit 1
fi fi
if [ -z "$WWW_SERVER_MAC_ADDRESS" ]; then if [ -z "$WWW_SERVER_MAC_ADDRESS" ]; then
echo "ERROR: the WWW_SERVER_MAC_ADDRESS is not specified. Check your 'project.conf'." echo "ERROR: the WWW_SERVER_MAC_ADDRESS is not specified. Check your project_definition."
exit 1 exit 1
fi fi
if [ -z "$BTCPAYSERVER_MAC_ADDRESS" ]; then if [ -z "$BTCPAYSERVER_MAC_ADDRESS" ]; then
echo "ERROR: the BTCPAYSERVER_MAC_ADDRESS is not specified. Check your 'project.conf'." echo "ERROR: the BTCPAYSERVER_MAC_ADDRESS is not specified. Check your project_definition."
exit 1 exit 1
fi fi
# the DOMAIN_LIST is a complete list of all our domains. We often iterate over this list. # the DOMAIN_LIST is a complete list of all our domains. We often iterate over this list.
DOMAIN_LIST="${PRIMARY_DOMAIN}" DOMAIN_LIST="${PRIMARY_DOMAIN}"

View File

@ -12,7 +12,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../defaults.sh source ../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../domain_env.sh source ../domain_env.sh
# with the lxd side, we are trying to expose ALL OUR services from one IP address, which terminates # with the lxd side, we are trying to expose ALL OUR services from one IP address, which terminates

View File

@ -19,52 +19,52 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../defaults.sh source ../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../domain_env.sh source ../domain_env.sh
### Let's check to ensure all the requiredsettings are set. ### Let's check to ensure all the requiredsettings are set.
if [ "$DEPLOY_GHOST" = true ]; then if [ "$DEPLOY_GHOST" = true ]; then
if [ -z "$GHOST_MYSQL_PASSWORD" ]; then if [ -z "$GHOST_MYSQL_PASSWORD" ]; then
echo "ERROR: Ensure GHOST_MYSQL_PASSWORD is configured in your site_definition." echo "ERROR: Ensure GHOST_MYSQL_PASSWORD is configured in your site.conf."
exit 1 exit 1
fi fi
if [ -z "$GHOST_MYSQL_ROOT_PASSWORD" ]; then if [ -z "$GHOST_MYSQL_ROOT_PASSWORD" ]; then
echo "ERROR: Ensure GHOST_MYSQL_ROOT_PASSWORD is configured in your site_definition." echo "ERROR: Ensure GHOST_MYSQL_ROOT_PASSWORD is configured in your site.conf."
exit 1 exit 1
fi fi
fi fi
if [ "$DEPLOY_GITEA" = true ]; then if [ "$DEPLOY_GITEA" = true ]; then
if [ -z "$GITEA_MYSQL_PASSWORD" ]; then if [ -z "$GITEA_MYSQL_PASSWORD" ]; then
echo "ERROR: Ensure GITEA_MYSQL_PASSWORD is configured in your site_definition." echo "ERROR: Ensure GITEA_MYSQL_PASSWORD is configured in your site.conf."
exit 1 exit 1
fi fi
if [ -z "$GITEA_MYSQL_ROOT_PASSWORD" ]; then if [ -z "$GITEA_MYSQL_ROOT_PASSWORD" ]; then
echo "ERROR: Ensure GITEA_MYSQL_ROOT_PASSWORD is configured in your site_definition." echo "ERROR: Ensure GITEA_MYSQL_ROOT_PASSWORD is configured in your site.conf."
exit 1 exit 1
fi fi
fi fi
if [ "$DEPLOY_NEXTCLOUD" = true ]; then if [ "$DEPLOY_NEXTCLOUD" = true ]; then
if [ -z "$NEXTCLOUD_MYSQL_ROOT_PASSWORD" ]; then if [ -z "$NEXTCLOUD_MYSQL_ROOT_PASSWORD" ]; then
echo "ERROR: Ensure NEXTCLOUD_MYSQL_ROOT_PASSWORD is configured in your site_definition." echo "ERROR: Ensure NEXTCLOUD_MYSQL_ROOT_PASSWORD is configured in your site.conf."
exit 1 exit 1
fi fi
if [ -z "$NEXTCLOUD_MYSQL_PASSWORD" ]; then if [ -z "$NEXTCLOUD_MYSQL_PASSWORD" ]; then
echo "ERROR: Ensure NEXTCLOUD_MYSQL_PASSWORD is configured in your site_definition." echo "ERROR: Ensure NEXTCLOUD_MYSQL_PASSWORD is configured in your site.conf."
exit 1 exit 1
fi fi
fi fi
if [ -z "$DUPLICITY_BACKUP_PASSPHRASE" ]; then if [ -z "$DUPLICITY_BACKUP_PASSPHRASE" ]; then
echo "ERROR: Ensure DUPLICITY_BACKUP_PASSPHRASE is configured in your site_definition." echo "ERROR: Ensure DUPLICITY_BACKUP_PASSPHRASE is configured in your site.conf."
exit 1 exit 1
fi fi
if [ -z "$DOMAIN_NAME" ]; then if [ -z "$DOMAIN_NAME" ]; then
echo "ERROR: Ensure DOMAIN_NAME is configured in your site_definition." echo "ERROR: Ensure DOMAIN_NAME is configured in your site.conf."
exit 1 exit 1
fi fi
@ -110,7 +110,7 @@ if [ "$RESTART_FRONT_END" = true ]; then
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../defaults.sh source ../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../domain_env.sh source ../domain_env.sh
# these variable are used by both backup/restore scripts. # these variable are used by both backup/restore scripts.

View File

@ -10,7 +10,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../defaults.sh source ../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../domain_env.sh source ../domain_env.sh
### Stop all services. ### Stop all services.

View File

@ -9,10 +9,10 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../../defaults.sh source ../../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../../domain_env.sh source ../../domain_env.sh
# for each language specified in the site_definition, we spawn a separate ghost container # for each language specified in the site.conf, we spawn a separate ghost container
# at https://www.domain.com/$LANGUAGE_CODE # at https://www.domain.com/$LANGUAGE_CODE
for LANGUAGE_CODE in ${SITE_LANGUAGE_CODES//,/ }; do for LANGUAGE_CODE in ${SITE_LANGUAGE_CODES//,/ }; do

View File

@ -9,7 +9,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../../defaults.sh source ../../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../../domain_env.sh source ../../domain_env.sh
if [ "$DEPLOY_GITEA" = true ]; then if [ "$DEPLOY_GITEA" = true ]; then

View File

@ -9,7 +9,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../../defaults.sh source ../../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../../domain_env.sh source ../../domain_env.sh
# ensure remote directories exist # ensure remote directories exist

View File

@ -19,7 +19,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../../defaults.sh source ../../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../../domain_env.sh source ../../domain_env.sh
if [ $iteration = 0 ]; then if [ $iteration = 0 ]; then

View File

@ -24,7 +24,7 @@ EOL
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../../defaults.sh source ../../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../../domain_env.sh source ../../domain_env.sh
@ -97,10 +97,10 @@ EOL
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../../defaults.sh source ../../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../../domain_env.sh source ../../domain_env.sh
# for each language specified in the site_definition, we spawn a separate ghost container # for each language specified in the site.conf, we spawn a separate ghost container
# at https://www.domain.com/$LANGUAGE_CODE # at https://www.domain.com/$LANGUAGE_CODE
for LANGUAGE_CODE in ${SITE_LANGUAGE_CODES//,/ }; do for LANGUAGE_CODE in ${SITE_LANGUAGE_CODES//,/ }; do
cat >> "$DOCKER_YAML_PATH" <<EOL cat >> "$DOCKER_YAML_PATH" <<EOL

View File

@ -11,7 +11,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
# source the site path so we know what features it has. # source the site path so we know what features it has.
source ../../../../defaults.sh source ../../../../defaults.sh
source "$SITE_PATH/site_definition" source "$SITE_PATH/site.conf"
source ../../domain_env.sh source ../../domain_env.sh
if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then