Compare commits
No commits in common. "6948856bc91cad2bae210850a28debba6d658943" and "070df55bf37c67998e6e71d1425ce4ec55bfa7e6" have entirely different histories.
6948856bc9
...
070df55bf3
@ -74,7 +74,7 @@ export GHOST_IMAGE="ghost:5.20.0"
|
|||||||
export GHOST_DB_IMAGE="$DEFAULT_DB_IMAGE"
|
export GHOST_DB_IMAGE="$DEFAULT_DB_IMAGE"
|
||||||
|
|
||||||
|
|
||||||
export NGINX_IMAGE="nginx:1.23.2"
|
export NGINX_IMAGE="nginx:1.23.1"
|
||||||
|
|
||||||
# version of backup is 24.0.3
|
# version of backup is 24.0.3
|
||||||
export NEXTCLOUD_IMAGE="nextcloud:25.0.0"
|
export NEXTCLOUD_IMAGE="nextcloud:25.0.0"
|
||||||
|
@ -25,7 +25,7 @@ if ! lsb_release -d | grep -q "Ubuntu 22.04"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
DOMAIN_NAME=
|
DOMAIN_NAME=
|
||||||
RUN_CERT_RENEWAL=false
|
RUN_CERT_RENEWAL=true
|
||||||
SKIP_WWW=false
|
SKIP_WWW=false
|
||||||
RESTORE_WWW=false
|
RESTORE_WWW=false
|
||||||
BACKUP_CERTS=false
|
BACKUP_CERTS=false
|
||||||
@ -348,7 +348,7 @@ fi
|
|||||||
PROJECT_DEFINITION_PATH="$PROJECT_PATH/project_definition"
|
PROJECT_DEFINITION_PATH="$PROJECT_PATH/project_definition"
|
||||||
if [ ! -f "$PROJECT_DEFINITION_PATH" ]; then
|
if [ ! -f "$PROJECT_DEFINITION_PATH" ]; then
|
||||||
|
|
||||||
# stub out a project_definition
|
# stub out a site_definition with new passwords.
|
||||||
cat >"$PROJECT_DEFINITION_PATH" <<EOL
|
cat >"$PROJECT_DEFINITION_PATH" <<EOL
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ EOL
|
|||||||
|
|
||||||
if [ "$DEPLOY_NOSTR_RELAY" = "true" ]; then
|
if [ "$DEPLOY_NOSTR_RELAY" = "true" ]; then
|
||||||
cat >> "$DOCKER_YAML_PATH" <<EOL
|
cat >> "$DOCKER_YAML_PATH" <<EOL
|
||||||
- nostrnet-$DOMAIN_IDENTIFIER-en
|
- nostrnet-$DOMAIN_IDENTIFIER
|
||||||
EOL
|
EOL
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -84,12 +84,7 @@ EOL
|
|||||||
|
|
||||||
|
|
||||||
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
||||||
export DOMAIN_NAME="$DOMAIN_NAME"
|
export DOMAIN_NAME="$DOMAIN_NAME"
|
||||||
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
|
|
||||||
|
|
||||||
# source the site path so we know what features it has.
|
|
||||||
source "$RESPOSITORY_PATH/reset_env.sh"
|
|
||||||
source "$SITE_PATH/site_definition"
|
|
||||||
source "$RESPOSITORY_PATH/domain_env.sh"
|
source "$RESPOSITORY_PATH/domain_env.sh"
|
||||||
|
|
||||||
# for each language specified in the site_definition, we spawn a separate ghost container
|
# for each language specified in the site_definition, we spawn a separate ghost container
|
||||||
@ -101,32 +96,34 @@ EOL
|
|||||||
|
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
if [ "$LANGUAGE_CODE" = en ]; then
|
done
|
||||||
if [ "$DEPLOY_GITEA" = true ]; then
|
|
||||||
cat >> "$DOCKER_YAML_PATH" <<EOL
|
|
||||||
|
if [ "$DEPLOY_GITEA" = true ]; then
|
||||||
|
cat >> "$DOCKER_YAML_PATH" <<EOL
|
||||||
giteanet-$DOMAIN_IDENTIFIER-en:
|
giteanet-$DOMAIN_IDENTIFIER-en:
|
||||||
attachable: true
|
attachable: true
|
||||||
|
|
||||||
EOL
|
EOL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DEPLOY_NEXTCLOUD" = true ]; then
|
if [ "$DEPLOY_NEXTCLOUD" = "true" ]; then
|
||||||
cat >> "$DOCKER_YAML_PATH" <<EOL
|
cat >> "$DOCKER_YAML_PATH" <<EOL
|
||||||
nextcloudnet-$DOMAIN_IDENTIFIER-en:
|
nextcloudnet-$DOMAIN_IDENTIFIER-en:
|
||||||
attachable: true
|
attachable: true
|
||||||
|
|
||||||
EOL
|
EOL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DEPLOY_NOSTR_RELAY" = true ]; then
|
|
||||||
cat >> "$DOCKER_YAML_PATH" <<EOL
|
if [ "$DEPLOY_NOSTR_RELAY" = "true" ]; then
|
||||||
nostrnet-$DOMAIN_IDENTIFIER-en:
|
cat >> "$DOCKER_YAML_PATH" <<EOL
|
||||||
|
nostrnet-$DOMAIN_IDENTIFIER:
|
||||||
attachable: true
|
attachable: true
|
||||||
|
|
||||||
EOL
|
EOL
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
done
|
||||||
|
|
||||||
docker stack deploy -c "$DOCKER_YAML_PATH" "reverse-proxy"
|
docker stack deploy -c "$DOCKER_YAML_PATH" "reverse-proxy"
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
set -exu
|
set -exu
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
docker pull "$NOSTR_RELAY_IMAGE"
|
|
||||||
|
|
||||||
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
||||||
export DOMAIN_NAME="$DOMAIN_NAME"
|
export DOMAIN_NAME="$DOMAIN_NAME"
|
||||||
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
|
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
|
||||||
@ -17,7 +15,6 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
|
|||||||
if [ "$DEPLOY_NOSTR_RELAY" = true ]; then
|
if [ "$DEPLOY_NOSTR_RELAY" = true ]; then
|
||||||
REMOTE_NOSTR_PATH="$REMOTE_HOME/nostr"
|
REMOTE_NOSTR_PATH="$REMOTE_HOME/nostr"
|
||||||
NOSTR_PATH="$REMOTE_NOSTR_PATH/$DOMAIN_NAME"
|
NOSTR_PATH="$REMOTE_NOSTR_PATH/$DOMAIN_NAME"
|
||||||
NOSTR_CONFIG_PATH="$SITE_PATH/webstack/nostr.config"
|
|
||||||
|
|
||||||
ssh "$PRIMARY_WWW_FQDN" mkdir -p "$NOSTR_PATH/data" "$NOSTR_PATH/db"
|
ssh "$PRIMARY_WWW_FQDN" mkdir -p "$NOSTR_PATH/data" "$NOSTR_PATH/db"
|
||||||
|
|
||||||
@ -41,41 +38,19 @@ services:
|
|||||||
# - USER_UID=1000
|
# - USER_UID=1000
|
||||||
networks:
|
networks:
|
||||||
- ${NET_NAME}
|
- ${NET_NAME}
|
||||||
configs:
|
|
||||||
- source: nostr-config
|
|
||||||
target: /usr/src/app/config.toml
|
|
||||||
deploy:
|
deploy:
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
${NET_NAME}:
|
${NET_NAME}:
|
||||||
name: "reverse-proxy_${NET_NAME}-en"
|
name: "reverse-proxy_${NET_NAME}"
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
configs:
|
|
||||||
nostr-config:
|
|
||||||
file: ${NOSTR_CONFIG_PATH}
|
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
# documentation: https://git.sr.ht/~gheartsfield/nostr-rs-relay/tree/0.7.0/item/config.toml
|
docker pull "$NOSTR_RELAY_IMAGE"
|
||||||
cat >>"$NOSTR_CONFIG_PATH" <<EOL
|
docker stack deploy -c "$DOCKER_YAML_PATH" "$DOMAIN_IDENTIFIER-nostr"
|
||||||
[info]
|
|
||||||
relay_url = "wss://${NOSTR_FQDN}/"
|
|
||||||
name = "${DOMAIN_NAME}"
|
|
||||||
|
|
||||||
# administrative contact pubkey TODO
|
|
||||||
#pubkey = ""
|
|
||||||
|
|
||||||
[options]
|
|
||||||
reject_future_seconds = 1800
|
|
||||||
|
|
||||||
[limits]
|
|
||||||
messages_per_sec = 3
|
|
||||||
#max_event_bytes = 131072
|
|
||||||
EOL
|
|
||||||
|
|
||||||
docker stack deploy -c "$DOCKER_YAML_PATH" "$DOMAIN_IDENTIFIER-nostr-$LANGUAGE_CODE"
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user