mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-20 04:37:09 +02:00
Fix certbot
This commit is contained in:
@@ -13,7 +13,7 @@ fi
|
|||||||
|
|
||||||
domains=("$DOMAIN" "www.$DOMAIN")
|
domains=("$DOMAIN" "www.$DOMAIN")
|
||||||
rsa_key_size=4096
|
rsa_key_size=4096
|
||||||
data_path="./data/certbot"
|
data_path="../data/certbot"
|
||||||
email="$EMAIL" # Adding a valid address is strongly recommended
|
email="$EMAIL" # Adding a valid address is strongly recommended
|
||||||
staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits
|
staging=0 # Set to 1 if you're testing your setup to avoid hitting request limits
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ fi
|
|||||||
echo "### Creating dummy certificate for $domains ..."
|
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 -f docker-compose.prod.yml run --rm --entrypoint "\
|
||||||
openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\
|
openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\
|
||||||
-keyout '$path/privkey.pem' \
|
-keyout '$path/privkey.pem' \
|
||||||
-out '$path/fullchain.pem' \
|
-out '$path/fullchain.pem' \
|
||||||
@@ -45,11 +45,11 @@ echo
|
|||||||
|
|
||||||
|
|
||||||
echo "### Starting nginx ..."
|
echo "### Starting nginx ..."
|
||||||
docker compose up --force-recreate -d nginx
|
docker compose -f docker-compose.prod.yml up --force-recreate -d nginx
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "### Deleting dummy certificate for $domains ..."
|
echo "### Deleting dummy certificate for $domains ..."
|
||||||
docker compose run --rm --entrypoint "\
|
docker compose -f docker-compose.prod.yml run --rm --entrypoint "\
|
||||||
rm -Rf /etc/letsencrypt/live/$domains && \
|
rm -Rf /etc/letsencrypt/live/$domains && \
|
||||||
rm -Rf /etc/letsencrypt/archive/$domains && \
|
rm -Rf /etc/letsencrypt/archive/$domains && \
|
||||||
rm -Rf /etc/letsencrypt/renewal/$domains.conf" certbot
|
rm -Rf /etc/letsencrypt/renewal/$domains.conf" certbot
|
||||||
@@ -72,7 +72,7 @@ esac
|
|||||||
# Enable staging mode if needed
|
# Enable staging mode if needed
|
||||||
if [ $staging != "0" ]; then staging_arg="--staging"; fi
|
if [ $staging != "0" ]; then staging_arg="--staging"; fi
|
||||||
|
|
||||||
docker compose run --rm --entrypoint "\
|
docker compose -f docker-compose.prod.yml run --rm --entrypoint "\
|
||||||
certbot certonly --webroot -w /var/www/certbot \
|
certbot certonly --webroot -w /var/www/certbot \
|
||||||
$staging_arg \
|
$staging_arg \
|
||||||
$email_arg \
|
$email_arg \
|
||||||
@@ -83,4 +83,4 @@ docker compose run --rm --entrypoint "\
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
echo "### Reloading nginx ..."
|
echo "### Reloading nginx ..."
|
||||||
docker compose exec nginx nginx -s reload
|
docker compose -f docker-compose.prod.yml exec nginx nginx -s reload
|
||||||
|
Reference in New Issue
Block a user