mirror of
https://github.com/michelleDeko/scalelite-run.git
synced 2025-12-16 22:32:10 +01:00
Fix init letsencrypt (#14)
* Fix openssl temp key generation 1024 fails with `routines:SSL_CTX_use_certificate:ee key too small` * Rename scalelite-nginx to scalelite-proxy This has been changed in https://github.com/jfederico/scalelite-run/commit/bc94d6 * Fix domains variable in init-letsencrypt.sh nginx looks for $URL_HOST and will break if the folder does not exist
This commit is contained in:
@@ -13,7 +13,7 @@ fi
|
|||||||
URL_HOST=$(grep URL_HOST .env | cut -d '=' -f2)
|
URL_HOST=$(grep URL_HOST .env | cut -d '=' -f2)
|
||||||
echo $URL_HOST
|
echo $URL_HOST
|
||||||
|
|
||||||
domains=($URL_HOST,redis.$URL_HOST)
|
domains=($URL_HOST)
|
||||||
rsa_key_size=4096
|
rsa_key_size=4096
|
||||||
data_path="./data/certbot"
|
data_path="./data/certbot"
|
||||||
email="$LETSENCRYPT_EMAIL" # Adding a valid address is strongly recommended
|
email="$LETSENCRYPT_EMAIL" # Adding a valid address is strongly recommended
|
||||||
@@ -39,15 +39,15 @@ echo "### Creating dummy certificate for $domains ..."
|
|||||||
path="/etc/letsencrypt/live/$domains"
|
path="/etc/letsencrypt/live/$domains"
|
||||||
mkdir -p "$data_path/conf/live/$domains"
|
mkdir -p "$data_path/conf/live/$domains"
|
||||||
docker-compose run --rm --entrypoint "\
|
docker-compose run --rm --entrypoint "\
|
||||||
openssl req -x509 -nodes -newkey rsa:1024 -days 1\
|
openssl req -x509 -nodes -newkey rsa:2048 -days 1\
|
||||||
-keyout '$path/privkey.pem' \
|
-keyout '$path/privkey.pem' \
|
||||||
-out '$path/fullchain.pem' \
|
-out '$path/fullchain.pem' \
|
||||||
-subj '/CN=localhost'" certbot
|
-subj '/CN=localhost'" certbot
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
echo "### Starting scalelite-nginx ..."
|
echo "### Starting scalelite-proxy ..."
|
||||||
docker-compose up --force-recreate -d scalelite-nginx
|
docker-compose up --force-recreate -d scalelite-proxy
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "### Deleting dummy certificate for $domains ..."
|
echo "### Deleting dummy certificate for $domains ..."
|
||||||
@@ -85,5 +85,5 @@ docker-compose run --rm --entrypoint "\
|
|||||||
--force-renewal" certbot
|
--force-renewal" certbot
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "### Reloading scalelite-nginx ..."
|
echo "### Reloading scalelite-proxy ..."
|
||||||
docker-compose exec scalelite-nginx nginx -s reload
|
docker-compose exec scalelite-proxy nginx -s reload
|
||||||
|
|||||||
Reference in New Issue
Block a user