feat(docs): add service files
This commit is contained in:
parent
15109819df
commit
1344099d14
6 changed files with 85 additions and 0 deletions
19
config/pronouns-api.service
Normal file
19
config/pronouns-api.service
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[Unit]
|
||||||
|
Description=pronouns.cc API
|
||||||
|
After=syslog.target
|
||||||
|
After=network.target
|
||||||
|
Requires=postgresql.service redis.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
RestartSec=2s
|
||||||
|
Type=simple
|
||||||
|
User=pronouns
|
||||||
|
Group=pronouns
|
||||||
|
AmbientCapabilities=
|
||||||
|
WorkingDirectory=/home/pronouns/src
|
||||||
|
ExecStart=/home/pronouns/src/pronouns web
|
||||||
|
Restart=always
|
||||||
|
Environment=USER=pronouns HOME=/home/pronouns
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
19
config/pronouns-clean.service
Normal file
19
config/pronouns-clean.service
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Clean pronouns.cc database
|
||||||
|
After=syslog.target
|
||||||
|
After=network.target
|
||||||
|
Requires=postgresql.service redis.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
RestartSec=2s
|
||||||
|
Type=oneshot
|
||||||
|
User=pronouns
|
||||||
|
Group=pronouns
|
||||||
|
AmbientCapabilities=
|
||||||
|
WorkingDirectory=/home/pronouns/src
|
||||||
|
ExecStart=/home/pronouns/src/pronouns database clean
|
||||||
|
Restart=no
|
||||||
|
Environment=USER=pronouns HOME=/home/pronouns
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
9
config/pronouns-clean.timer
Normal file
9
config/pronouns-clean.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Clean pronouns.cc database daily
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
19
config/pronouns-exporter.service
Normal file
19
config/pronouns-exporter.service
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[Unit]
|
||||||
|
Description=pronouns.cc data exporter service
|
||||||
|
After=syslog.target
|
||||||
|
After=network.target
|
||||||
|
Requires=postgresql.service redis.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
RestartSec=2s
|
||||||
|
Type=simple
|
||||||
|
User=pronouns
|
||||||
|
Group=pronouns
|
||||||
|
AmbientCapabilities=
|
||||||
|
WorkingDirectory=/home/pronouns/src
|
||||||
|
ExecStart=/home/pronouns/src/pronouns exporter
|
||||||
|
Restart=always
|
||||||
|
Environment=USER=pronouns HOME=/home/pronouns
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
19
config/pronouns-fe.service
Normal file
19
config/pronouns-fe.service
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[Unit]
|
||||||
|
Description=pronouns.cc frontend
|
||||||
|
After=syslog.target
|
||||||
|
After=network.target
|
||||||
|
Requires=pronouns-api.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
RestartSec=2s
|
||||||
|
Type=simple
|
||||||
|
User=pronouns
|
||||||
|
Group=pronouns
|
||||||
|
AmbientCapabilities=
|
||||||
|
WorkingDirectory=/home/pronouns/src/frontend
|
||||||
|
ExecStart=node build/index.js
|
||||||
|
Restart=always
|
||||||
|
Environment=USER=pronouns HOME=/home/pronouns
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue