diff --git a/website/_deploy.sh b/website/_deploy.sh new file mode 100644 index 0000000..1606998 --- /dev/null +++ b/website/_deploy.sh @@ -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 diff --git a/website/_install.sh b/website/_install.sh new file mode 100644 index 0000000..f291550 --- /dev/null +++ b/website/_install.sh @@ -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