diff options
Diffstat (limited to 'init-letsencrypt.sh')
-rwxr-xr-x | init-letsencrypt.sh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/init-letsencrypt.sh b/init-letsencrypt.sh index 1a4d3e3..e6c2c3d 100755 --- a/init-letsencrypt.sh +++ b/init-letsencrypt.sh @@ -5,13 +5,14 @@ if ! [ -x "$(command -v docker-compose)" ]; then exit 1 fi -HOST_NAME=$(grep HOST_NAME .env | cut -d '=' -f2) +URL_HOST=$(grep URL_HOST .env | cut -d '=' -f2) +echo $URL_HOST -domains=($HOST_NAME) +domains=($URL_HOST) rsa_key_size=4096 data_path="./data/certbot" -email="" # Adding a valid address is strongly recommended -staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits +email="$LETSENCRYPT_EMAIL" # Adding a valid address is strongly recommended +staging=${LETSENCRYPT_STAGING:-0} # Set to 1 if you're testing your setup to avoid hitting request limits if [ -d "$data_path" ]; then read -p "Existing data found for $domains. Continue and replace existing certificate? (y/N) " decision @@ -40,8 +41,8 @@ docker-compose run --rm --entrypoint "\ echo -echo "### Starting nginx ..." -docker-compose up --force-recreate -d nginx +echo "### Starting scalelite-nginx ..." +docker-compose up --force-recreate -d scalelite-nginx echo echo "### Deleting dummy certificate for $domains ..." @@ -78,5 +79,5 @@ docker-compose run --rm --entrypoint "\ --force-renewal" certbot echo -echo "### Reloading nginx ..." -docker-compose exec nginx nginx -s reload +echo "### Reloading scalelite-nginx ..." +docker-compose exec scalelite-nginx nginx -s reload |