Konfiguriere Minion Job Queue
This commit is contained in:
parent
400b61b934
commit
2c02f0d5cb
5 changed files with 59 additions and 6 deletions
21
templates/lstu-minion.service
Normal file
21
templates/lstu-minion.service
Normal file
|
@ -0,0 +1,21 @@
|
|||
[Unit]
|
||||
Description=Shortened URLs service job queue
|
||||
Documentation=https://framagit.org/fiat-tux/hat-softwares/lstu
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ lstu_user }}
|
||||
WorkingDirectory={{ lstu.path }}
|
||||
ExecStart=/usr/bin/carton exec script/application minion worker
|
||||
|
||||
# Hardening
|
||||
CapabilityBoundingSet=
|
||||
PrivateMounts=true
|
||||
PrivateTmp=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHome=true
|
||||
ProtectSystem=strict
|
||||
ReadWritePaths=-{{ lstu.path }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -2,3 +2,7 @@ check process lstu with pidfile {{ lstu.path }}/script/hypnotoad.pid
|
|||
start program = "/bin/systemctl start {{ lstu_service }}"
|
||||
stop program = "/bin/systemctl stop {{ lstu_service }}"
|
||||
if failed host {{ ansible_default_ipv4.address }} port 8080 with timeout 15 seconds for 3 times within 4 cycles then restart
|
||||
|
||||
check process lstu-minion matching "perl script/application minion worker"
|
||||
start program = "/bin/systemctl start {{ minion_service }}"
|
||||
stop program = "/bin/systemctl stop {{ minion_service }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue