Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
dd446a753e | |||
19f09254e8 | |||
55dc01a3b0 | |||
edf6f9a227 | |||
2aa01b3305 | |||
683987fa74 | |||
2a74a27858 | |||
53f7287f3f | |||
b57d9cfb6b | |||
13ed119d53 | |||
12860ee6cf | |||
d66f65f963 | |||
2eeba0b2cc | |||
5d9ac88d92 | |||
e7fdc1246e | |||
c0914ee45a | |||
cbc349719f |
@ -26,7 +26,7 @@ if [ "$UPDATE_BTCPAY" = true ]; then
|
||||
elif [ "$RESTORE_BTCPAY" = true ]; then
|
||||
# run the update.
|
||||
ssh "$BTCPAY_SERVER_FQDN" "bash -c $BTCPAY_SERVER_APPPATH/btcpay-down.sh"
|
||||
sleep 15
|
||||
sleep 25
|
||||
|
||||
./restore.sh
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -eu
|
||||
|
||||
export NEXTCLOUD_FQDN="$NEXTCLOUD_HOSTNAME.$DOMAIN_NAME"
|
||||
export BTCPAY_USER_FQDN="$BTCPAY_HOSTNAME_IN_CERT.$DOMAIN_NAME"
|
||||
@ -19,6 +19,7 @@ SHASUM_OF_DOMAIN="$(echo -n "$DOMAIN_NAME" | sha256sum | awk '{print $1;}' )"
|
||||
export DOMAIN_IDENTIFIER="${SHASUM_OF_DOMAIN: -6}"
|
||||
echo "$DOMAIN_IDENTIFIER" > "$SITE_PATH/domain_id"
|
||||
|
||||
SITE_LANGUAGE_CODES=en
|
||||
export LANGUAGE_CODE_COUNT=$(("$(echo "$SITE_LANGUAGE_CODES" | tr -cd , | wc -c)"+1))
|
||||
|
||||
STACK_NAME="$DOMAIN_IDENTIFIER-en"
|
||||
|
2
lnplay
2
lnplay
@ -1 +1 @@
|
||||
Subproject commit 7e17a612f0bf1bd5b80c112925d1c1535b01559d
|
||||
Subproject commit 0a3562e4f2d477cdae17e8f675b4319aa0b07cf1
|
@ -27,12 +27,8 @@ export NEXTCLOUD_MYSQL_ROOT_PASSWORD=
|
||||
export GITEA_MYSQL_ROOT_PASSWORD=
|
||||
export DUPLICITY_BACKUP_PASSPHRASE=
|
||||
|
||||
|
||||
|
||||
DEFAULT_DB_IMAGE="mariadb:10.11.2-jammy"
|
||||
|
||||
|
||||
|
||||
# run the docker stack.
|
||||
export GHOST_IMAGE="ghost:5.53.3"
|
||||
|
||||
@ -54,8 +50,5 @@ export GITEA_DB_IMAGE="$DEFAULT_DB_IMAGE"
|
||||
|
||||
export NOSTR_RELAY_IMAGE="scsibug/nostr-rs-relay"
|
||||
|
||||
export WWW_SERVER_MAC_ADDRESS=
|
||||
export BTCPAY_SERVER_MAC_ADDRESS=
|
||||
|
||||
export OTHER_SITES_LIST=
|
||||
export BTCPAY_ALT_NAMES=
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -exu
|
||||
set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
APP=
|
||||
|
@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
# let's do a refresh of the certificates. Let's Encrypt will not run if it's not time.
|
||||
docker pull certbot/certbot:latest
|
||||
docker pull -q certbot/certbot:latest
|
||||
|
||||
# iterate over each domain and call certbot
|
||||
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
||||
|
12
www/go.sh
12
www/go.sh
@ -84,7 +84,17 @@ fi
|
||||
|
||||
# generate the certs and grab a backup
|
||||
if [ "$RUN_CERT_RENEWAL" = true ] && [ "$RESTORE_CERTS" = false ] && [ "$STACKS_STILL_RUNNING" = false ]; then
|
||||
./generate_certs.sh
|
||||
echo "SKIPPING CERT GENERATION"
|
||||
#./generate_certs.sh
|
||||
fi
|
||||
|
||||
|
||||
if [ "$RESTORE_WWW" = true ]; then
|
||||
APP_LIST="letsencrypt ghost gitea nostr"
|
||||
for APP in $APP_LIST; do
|
||||
export APP="$APP"
|
||||
./restore_path.sh
|
||||
done
|
||||
fi
|
||||
|
||||
# nginx gets deployed first since it "owns" the docker networks of downstream services.
|
||||
|
@ -3,6 +3,13 @@
|
||||
set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# these variable are used by both backup/restore scripts.
|
||||
export REMOTE_BACKUP_PATH="$REMOTE_BACKUP_PATH/www/$APP/$DOMAIN_IDENTIFIER"
|
||||
export REMOTE_SOURCE_BACKUP_PATH="$REMOTE_DATA_PATH/$APP/$DOMAIN_NAME"
|
||||
|
||||
export LOCAL_BACKUP_PATH="$SITE_PATH/backups/www/$APP"
|
||||
mkdir -p "$LOCAL_BACKUP_PATH"
|
||||
|
||||
FILE_COUNT="$(find "$LOCAL_BACKUP_PATH" -type f | wc -l)"
|
||||
if [ "$FILE_COUNT" = 0 ]; then
|
||||
exit 0
|
||||
|
@ -23,7 +23,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
||||
STACK_NAME="$DOMAIN_IDENTIFIER-$APP-$LANGUAGE_CODE"
|
||||
|
||||
if docker stack list --format "{{.Name}}" | grep -q "$STACK_NAME"; then
|
||||
docker stack rm "$STACK_NAME"
|
||||
docker stack rm "$STACK_NAME" > /dev/null
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
@ -45,7 +45,7 @@ done
|
||||
|
||||
# remove the nginx stack
|
||||
if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then
|
||||
docker stack rm reverse-proxy
|
||||
docker stack rm reverse-proxy > /dev/null
|
||||
|
||||
sleep 10
|
||||
fi
|
||||
|
@ -4,7 +4,7 @@ set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
|
||||
docker pull "$GHOST_IMAGE"
|
||||
docker pull -q "$GHOST_IMAGE"
|
||||
|
||||
DEPLOY_STACK=false
|
||||
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
||||
|
@ -4,8 +4,8 @@ set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
|
||||
docker pull "$GITEA_IMAGE"
|
||||
docker pull "$GITEA_DB_IMAGE"
|
||||
docker pull -q "$GITEA_IMAGE"
|
||||
docker pull -q "$GITEA_DB_IMAGE"
|
||||
|
||||
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
||||
export DOMAIN_NAME="$DOMAIN_NAME"
|
||||
|
@ -4,7 +4,7 @@ set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
|
||||
docker pull "$NEXTCLOUD_IMAGE"
|
||||
docker pull -q "$NEXTCLOUD_IMAGE"
|
||||
|
||||
|
||||
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
||||
|
@ -3,7 +3,7 @@
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker pull "$NGINX_IMAGE"
|
||||
docker pull -q "$NGINX_IMAGE"
|
||||
|
||||
#https://github.com/fiatjaf/expensive-relay
|
||||
# NOSTR RELAY WHICH REQUIRES PAYMENTS.
|
||||
|
@ -3,7 +3,7 @@
|
||||
set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker pull "$NOSTR_RELAY_IMAGE"
|
||||
docker pull -q "$NOSTR_RELAY_IMAGE"
|
||||
|
||||
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
||||
export DOMAIN_NAME="$DOMAIN_NAME"
|
||||
|
Loading…
Reference in New Issue
Block a user