25 lines
597 B
Django/Jinja
25 lines
597 B
Django/Jinja
[Unit]
|
|
Description=Nomad
|
|
Documentation=https://nomadproject.io/docs/
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
ConditionFileNotEmpty={{ nomad_root_dir }}/etc/nomad.json
|
|
|
|
[Service]
|
|
EnvironmentFile=-{{ nomad_root_dir }}/etc/nomad.env
|
|
User={{ nomad_user }}
|
|
Group={{ nomad_user }}
|
|
ExecStart={{ nomad_root_dir }}/bin/nomad agent -config={{ nomad_root_dir }}/etc/
|
|
ExecReload=/bin/kill --signal HUP $MAINPID
|
|
KillMode=process
|
|
KillSignal=SIGINT
|
|
Restart=on-failure
|
|
LimitNOFILE=65536
|
|
LimitNPROC=infinity
|
|
RestartSec=2
|
|
TasksMax=infinity
|
|
OOMScoreAdjust=-1000
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|