Zack Williams | 7099644 | 2020-10-01 22:09:49 -0700 | [diff] [blame] | 1 | {# |
| 2 | SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 3 | SPDX-License-Identifier: Apache-2.0 |
| 4 | #} |
Zack Williams | 952bc00 | 2020-10-04 09:45:59 -0700 | [diff] [blame] | 5 | # /etc/systemd/system/timesheetsdb |
| 6 | # {{ ansible_managed }} |
Zack Williams | 7099644 | 2020-10-01 22:09:49 -0700 | [diff] [blame] | 7 | [Unit] |
| 8 | Description=Timesheets DB Service |
| 9 | Documentation=https://github.com/opennetworkinglab/timesheetsdb |
| 10 | After=network-online.target |
| 11 | Wants=network-online.target |
| 12 | |
Zack Williams | 7099644 | 2020-10-01 22:09:49 -0700 | [diff] [blame] | 13 | [Service] |
| 14 | Type=simple |
| 15 | |
| 16 | User={{ timesheets_username }} |
| 17 | Group={{ timesheets_groupname }} |
Zack Williams | 7099644 | 2020-10-01 22:09:49 -0700 | [diff] [blame] | 18 | |
Zack Williams | 952bc00 | 2020-10-04 09:45:59 -0700 | [diff] [blame] | 19 | EnvironmentFile=/etc/default/timesheetsdb |
| 20 | WorkingDirectory={{ timesheets_dir }}/db |
| 21 | ExecStart=/usr/bin/npm run start:prod |
Zack Williams | 7099644 | 2020-10-01 22:09:49 -0700 | [diff] [blame] | 22 | |
| 23 | Restart=on-failure |
| 24 | RestartSec=30 |
| 25 | PrivateTmp=true |
| 26 | |
| 27 | [Install] |
| 28 | WantedBy=multi-user.target |