From 272fdcca19cae2f91167f3cc97a2e8b5e189ad48 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Wed, 29 May 2024 13:11:22 +0200 Subject: [PATCH] feat: add `caddy` install and deploy scripts --- caddy/_deploy.sh | 9 +++++++++ caddy/_install.sh | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 caddy/_deploy.sh create mode 100644 caddy/_install.sh diff --git a/caddy/_deploy.sh b/caddy/_deploy.sh new file mode 100644 index 0000000..f2e1de2 --- /dev/null +++ b/caddy/_deploy.sh @@ -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 diff --git a/caddy/_install.sh b/caddy/_install.sh new file mode 100644 index 0000000..3c334d3 --- /dev/null +++ b/caddy/_install.sh @@ -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