feat: add caddy install and deploy scripts

This commit is contained in:
Julien Oculi 2024-05-29 13:11:22 +02:00
parent aaabd915f5
commit 272fdcca19
2 changed files with 18 additions and 0 deletions

9
caddy/_deploy.sh Normal file
View file

@ -0,0 +1,9 @@
# Setup caddy config
mkdir /etc/caddy
cp -R ./caddy/* /etc/caddy
# Setup caddy service
cp ./caddy/systemd/caddy.service /etc/systemd/system
# Start caddy
systemctl start caddy.service

9
caddy/_install.sh Normal file
View file

@ -0,0 +1,9 @@
# Install prerequistes
nala install -y debian-keyring debian-archive-keyring apt-transport-https curl
# Install sources and keys
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
# Install caddy
nala install -y caddy