This repository has been archived on 2025-06-03. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
companion-setup/scripts/install.sh
2025-04-12 16:30:01 +02:00

28 lines
850 B
Bash
Executable file

#!/bin/bash
cd "$(dirname "$0")/.."
. .env
git submodule update --init
apt install -y python3-pyroute2
if [ $? -ne 0 ]; then
echo -e "\033[0;31mCouldn't install pyroute2. You must install it manually.\033[0m"
fi
docker compose up -d acme
docker compose exec acme mkdir /var/www/html/$DOMAIN
docker compose exec acme mkdir /etc/ssl/$DOMAIN
echo "Please wait, this will take a few minutes"
docker compose exec acme openssl dhparam -out /etc/ssl/dhparam.pem 3072
docker compose exec acme openssl req -new -x509 -days 365 -noenc -out /etc/ssl/snakeoil.pem -keyout /etc/ssl/snakeoil.key -subj "/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd"
docker compose exec acme ln -s /etc/ssl/snakeoil.key /etc/ssl/$DOMAIN/key.pem
docker compose exec acme ln -s /etc/ssl/snakeoil.pem /etc/ssl/$DOMAIN/fullchain.pem
docker compose down
./scripts/reset.sh