diff --git a/website/_deploy.sh b/website/_deploy.sh index 3b13563..e9adc43 100644 --- a/website/_deploy.sh +++ b/website/_deploy.sh @@ -3,7 +3,7 @@ cd /srv/www git pull origin main # Setup website service -cp /srv/www/website.service /etc/systemd/system +cp ./website/systemd/website.service /etc/systemd/system # Start website systemctl daemon-reload diff --git a/website/systemd/website.service b/website/systemd/website.service new file mode 100644 index 0000000..20b7bd4 --- /dev/null +++ b/website/systemd/website.service @@ -0,0 +1,17 @@ +[Unit] +Description=Website Deno 1.1.1 service +Documentation=http://deno.land +Wants=network-online.target +After=network-online.target + +[Service] +Type=simple +User=deno +WorkingDirectory=/srv/www +ExecStartPre=/usr/local/bin/deno task build +Environment=PORT=6060 +ExecStart=/usr/local/bin/deno task serve +Restart=on-failure + +[Install] +WantedBy=multi-user.target