1
1

Minor updates to control.

This commit is contained in:
Derek Smith 2022-05-24 14:22:04 -04:00
parent 3f94dbb62a
commit 806794c308
Signed by: farscapian
GPG Key ID: 8F1CD799CCA516CC
5 changed files with 15 additions and 36 deletions

View File

@ -2,12 +2,6 @@
set -eux set -eux
# check to ensure the admin has specified a MACVLAN interface
if [ -z "$MACVLAN_INTERFACE" ]; then
echo "ERROR: MACVLAN_INTERFACE not defined in project."
exit 1
fi
# The base VM image. # The base VM image.
BASE_LXC_IMAGE="ubuntu/22.04/cloud" BASE_LXC_IMAGE="ubuntu/22.04/cloud"
@ -24,7 +18,7 @@ export SSH_AUTHORIZED_KEY="$SSH_AUTHORIZED_KEY"
envsubst < ./lxc_profile.yml > "$SITE_PATH/cloud-init-$APP_TO_DEPLOY.yml" envsubst < ./lxc_profile.yml > "$SITE_PATH/cloud-init-$APP_TO_DEPLOY.yml"
# configure the profile with our generated cloud-init.yml file. # configure the profile with our generated cloud-init.yml file.
lxc profile edit "$LXD_VM_NAME" < "$SITE_PATH/cloud-init-$APP_TO_DEPLOY.yml" cat "$SITE_PATH/cloud-init-$APP_TO_DEPLOY.yml" | lxc profile edit "$LXD_VM_NAME"
function wait_for_lxc_ip { function wait_for_lxc_ip {

View File

@ -41,7 +41,6 @@ if [ "$APP_TO_DEPLOY" = www ] || [ "$APP_TO_DEPLOY" = certonly ]; then
docker-machine create --driver amazonec2 \ docker-machine create --driver amazonec2 \
--amazonec2-open-port 80 \ --amazonec2-open-port 80 \
--amazonec2-open-port 443 \ --amazonec2-open-port 443 \
--amazonec2-open-port 8448 \
--amazonec2-access-key "$AWS_ACCESS_KEY" \ --amazonec2-access-key "$AWS_ACCESS_KEY" \
--amazonec2-secret-key "$AWS_SECRET_ACCESS_KEY" \ --amazonec2-secret-key "$AWS_SECRET_ACCESS_KEY" \
--amazonec2-region "$AWS_REGION" \ --amazonec2-region "$AWS_REGION" \
@ -70,7 +69,7 @@ elif [ "$APP_TO_DEPLOY" = btcpay ]; then
fi fi
docker-machine scp "$SITE_PATH/authorized_keys" "$FQDN:$REMOTE_HOME/authorized_keys" docker-machine scp "$LXD_REMOTE_PATH/authorized_keys" "$FQDN:$REMOTE_HOME/authorized_keys"
docker-machine ssh "$FQDN" "cat $REMOTE_HOME/authorized_keys >> $REMOTE_HOME/.ssh/authorized_keys" docker-machine ssh "$FQDN" "cat $REMOTE_HOME/authorized_keys >> $REMOTE_HOME/.ssh/authorized_keys"
# we have to ensure ubuntu is able to do sudo less docker commands. # we have to ensure ubuntu is able to do sudo less docker commands.

View File

@ -41,6 +41,7 @@ export BTCPAY_ENABLE_SSH=true
cd btcpayserver-docker cd btcpayserver-docker
if [ "${BTC_CHAIN}" != regtest ]; then
# run fast_sync if it's not been done before. # run fast_sync if it's not been done before.
if [ ! -f /home/ubuntu/fast_sync_completed ]; then if [ ! -f /home/ubuntu/fast_sync_completed ]; then
cd ./contrib/FastSync cd ./contrib/FastSync
@ -48,6 +49,7 @@ if [ ! -f /home/ubuntu/fast_sync_completed ]; then
touch /home/ubuntu/fast_sync_completed touch /home/ubuntu/fast_sync_completed
cd - cd -
fi fi
fi
# provision the btcpay server # provision the btcpay server
. ./btcpay-setup.sh -i . ./btcpay-setup.sh -i

View File

@ -33,7 +33,6 @@ cat >>"$DOCKER_YAML_PATH" <<EOL
- ${REMOTE_HOME}/ghost_site:/var/lib/ghost/content - ${REMOTE_HOME}/ghost_site:/var/lib/ghost/content
environment: environment:
- url=https://${FQDN} - url=https://${FQDN}
- mail__from="${MAIL_FROM}"
- mail__options__service=SMTP - mail__options__service=SMTP
- mail__transport=SMTP - mail__transport=SMTP
- mail__options__host=${SMTP_SERVER} - mail__options__host=${SMTP_SERVER}
@ -189,7 +188,6 @@ cat >>"$DOCKER_YAML_PATH" <<EOL
- ${REMOTE_HOME}/tor_ghost:/var/lib/ghost/content - ${REMOTE_HOME}/tor_ghost:/var/lib/ghost/content
environment: environment:
- url=https://${ONION_ADDRESS} - url=https://${ONION_ADDRESS}
- mail__from=${MAIL_FROM}
- mail__options__service=SMTP - mail__options__service=SMTP
- mail__transport=SMTP - mail__transport=SMTP
- mail__options__host=${SMTP_SERVER} - mail__options__host=${SMTP_SERVER}
@ -217,20 +215,6 @@ cat >>"$DOCKER_YAML_PATH" <<EOL
ports: ports:
- 0.0.0.0:443:443 - 0.0.0.0:443:443
- 0.0.0.0:80:80 - 0.0.0.0:80:80
- 0.0.0.0:8448:8448
networks:
- ghost-net
EOL
# NGINX required
cat >>"$DOCKER_YAML_PATH" <<EOL
nginx:
image: ${NGINX_IMAGE}
ports:
- 0.0.0.0:443:443
- 0.0.0.0:80:80
- 0.0.0.0:8448:8448
networks: networks:
- ghost-net - ghost-net
EOL EOL
@ -262,7 +246,7 @@ fi
# the rest of the nginx config # the rest of the nginx config
cat >>"$DOCKER_YAML_PATH" <<EOL cat >>"$DOCKER_YAML_PATH" <<EOL
volumes: volumes:
- /etc/letsencrypt:/etc/letsencrypt:ro - ${REMOTE_HOME}/letsencrypt:/etc/letsencrypt:ro
configs: configs:
- source: nginx-config - source: nginx-config
target: /etc/nginx/nginx.conf target: /etc/nginx/nginx.conf