feat: add website install and deploy scripts

This commit is contained in:
Julien Oculi 2024-05-29 14:03:17 +02:00
parent 764974bd6e
commit b1f2ebaaa1
2 changed files with 28 additions and 0 deletions

11
website/_deploy.sh Normal file
View file

@ -0,0 +1,11 @@
# Pull website sources
cd /srv/www
git pull origin main
# Setup website service
cp /srv/www/website.service /etc/systemd/system
# Start website
systemctl deamon-reload
systemctl enable website
systemctl start website

17
website/_install.sh Normal file
View file

@ -0,0 +1,17 @@
# Install deno
curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh
# Create group and user
groupadd --system deno
useradd --system \
--gid deno
--create-home \
--home-dir /var/lib/deno \
--shell /usr/sbin/nologin \
--comment "Deno js engine" \
deno
# Clone website repo
mkdir -p /srv/www
git clone https://git.cohabit.fr/cohabit/website.git /srv/www