diff --git a/systemd/.config/systemd/user/hungryroot-web.service b/systemd/.config/systemd/user/hungryroot-web.service new file mode 100644 index 0000000..0df7736 --- /dev/null +++ b/systemd/.config/systemd/user/hungryroot-web.service @@ -0,0 +1,20 @@ +[Unit] +Description=Hungryroot web (Astro/Vite) dev server +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +WorkingDirectory=/home/powellc/src/github.com/hungryroot/web +Environment=PATH=%h/.volta/bin:/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin +Environment=VOLTA_HOME=%h/.volta +Environment=DEV_HOST=hungryroot.service +Environment=DEV_PORT=8002 +ExecStart=/bin/bash -lc 'cd /home/powellc/src/github.com/hungryroot/web && exec npm run dev' +Restart=on-failure +RestartSec=2 +StandardOutput=append:/tmp/hungryroot-web.log +StandardError=inherit + +[Install] +WantedBy=default.target