Try this
This commit is contained in:
parent
ad158462f9
commit
17d911b043
3 changed files with 19 additions and 17 deletions
11
install.sh
11
install.sh
|
@ -13,15 +13,16 @@ if [ $? -ne 0 ]; then
|
|||
echo -e "\033[0;31mCouldn't install pyroute2. You must install it manually.\033[0m"
|
||||
fi
|
||||
|
||||
echo "Issuing certificate..."
|
||||
./scripts/update_config.sh
|
||||
|
||||
CERT_DIR=/etc/ssl/$DOMAIN
|
||||
echo "Issuing certificate..."
|
||||
|
||||
docker compose up -d acme
|
||||
|
||||
docker compose exec acme mkdir $CERT_DIR
|
||||
docker compose exec acme ln -s /etc/nginx/snakeoil.key $CERT_DIR/key.pem
|
||||
docker compose exec acme ln -s /etc/nginx/snakeoil.pem $CERT_DIR/fullchain.pem
|
||||
docker compose exec nginx mkdir /var/www/html/$DOMAIN
|
||||
docker compose exec acme mkdir /etc/ssl/$DOMAIN
|
||||
docker compose exec acme ln -s /etc/nginx/snakeoil.key /etc/ssl/$DOMAIN/key.pem
|
||||
docker compose exec acme ln -s /etc/nginx/snakeoil.pem /etc/ssl/$DOMAIN/fullchain.pem
|
||||
|
||||
docker compose up -d nginx
|
||||
|
||||
|
|
13
reset.sh
13
reset.sh
|
@ -2,18 +2,7 @@
|
|||
cd "$(dirname "$0")"
|
||||
. .env
|
||||
|
||||
echo "Updating config"
|
||||
|
||||
if [ "$GLUETUN" = true ]; then
|
||||
export UPSTREAM=gluetun
|
||||
else
|
||||
export UPSTREAM=companion
|
||||
fi
|
||||
|
||||
echo -e "# Don't edit this file. Edit the .tmpl file\n\n" > nginx/conf.d/companion.conf
|
||||
DOMAIN=$DOMAIN envsubst '$DOMAIN,$UPSTREAM' < nginx/conf.d/companion.conf.tmpl >> nginx/conf.d/companion.conf
|
||||
|
||||
|
||||
./scripts/update_config.sh
|
||||
|
||||
if [ -n "$IPV6_SUBNET" ]; then
|
||||
echo "Rotating IP..."
|
||||
|
|
12
scripts/update_config.sh
Normal file
12
scripts/update_config.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
. ../.env
|
||||
|
||||
if [ "$GLUETUN" = true ]; then
|
||||
export UPSTREAM=gluetun
|
||||
else
|
||||
export UPSTREAM=companion
|
||||
fi
|
||||
|
||||
echo -e "# Don't edit this file. Edit the .tmpl file\n\n" > nginx/conf.d/companion.conf
|
||||
DOMAIN=$DOMAIN envsubst '$DOMAIN,$UPSTREAM' < nginx/conf.d/companion.conf.tmpl >> nginx/conf.d/companion.conf
|
Reference in a new issue