From e0f7c68e3cd06a3d9e0827f1864834751b61b65b Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Thu, 6 Jun 2024 15:58:35 +0200 Subject: [PATCH] refactor: move `website` service from website repo to server_config --- website/_deploy.sh | 2 +- website/systemd/website.service | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 website/systemd/website.service 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