Add deployment service file and document system service setup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
11
README.md
11
README.md
@@ -73,6 +73,17 @@ DELETE /api/tasks/:id blocked if task has subtasks
|
||||
POST /api/render-markdown body: { text, mode? } → { html }
|
||||
```
|
||||
|
||||
## Running as a system service
|
||||
|
||||
`deployment/task-inventory.service` is a systemd unit file. To use it:
|
||||
|
||||
1. Fill in `WorkingDirectory` with the path to the deployed app
|
||||
2. Create a dedicated user: `useradd -r task-inventory`
|
||||
3. Copy the unit file to `/etc/systemd/system/`
|
||||
4. `systemctl enable --now task-inventory`
|
||||
|
||||
Packaging (Arch, Debian, etc.) is not set up yet.
|
||||
|
||||
## File map
|
||||
|
||||
```
|
||||
|
||||
15
deployment/task-inventory.service
Normal file
15
deployment/task-inventory.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Task Inventory
|
||||
#RequiresMountsFor=...
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=task-inventory
|
||||
Group=task-inventory
|
||||
Type=simple
|
||||
ExecStart=node server.mjs
|
||||
WorkingDirectory= MUST BE FILLED IN
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user