forked from cohabit/server_config
feat: add website
install and deploy scripts
This commit is contained in:
parent
764974bd6e
commit
b1f2ebaaa1
11
website/_deploy.sh
Normal file
11
website/_deploy.sh
Normal 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
17
website/_install.sh
Normal 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
|
Loading…
Reference in a new issue