Init project
This commit is contained in:
parent
de5a8de641
commit
88bdb77e83
10 changed files with 261 additions and 1 deletions
3
templates/env.j2
Normal file
3
templates/env.j2
Normal file
|
@ -0,0 +1,3 @@
|
|||
# From Dockerfile
|
||||
VIRTUAL_ENV=/opt/venv
|
||||
PATH=/opt/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
13
templates/systemd-run.sh.j2
Normal file
13
templates/systemd-run.sh.j2
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
systemd-run \
|
||||
--pty \
|
||||
--property=User={{ host.data.systemd['User'] }} \
|
||||
--property=Group={{ host.data.systemd['Group'] }} \
|
||||
--property=EnvironmentFile={{ host.data.systemd['EnvironmentFile'] }} \
|
||||
--property=WorkingDirectory={{ host.data.systemd['WorkingDirectory'] }} \
|
||||
--property=RootDirectory={{ host.data.systemd['RootDirectory'] }} \
|
||||
--property='BindPaths={{ host.data.systemd['BindPaths'] }}' \
|
||||
--property='BindReadOnlyPaths={{ host.data.systemd['BindReadOnlyPaths'] }}' \
|
||||
"$@"
|
20
templates/systemd.service.j2
Normal file
20
templates/systemd.service.j2
Normal file
|
@ -0,0 +1,20 @@
|
|||
[Unit]
|
||||
Description={{ host.data.systemd['Description'] }}
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ host.data.systemd['User'] }}
|
||||
Group={{ host.data.systemd['Group'] }}
|
||||
EnvironmentFile={{ host.data.systemd['EnvironmentFile'] }}
|
||||
WorkingDirectory={{ host.data.systemd['WorkingDirectory'] }}
|
||||
RootDirectory={{ host.data.systemd['RootDirectory'] }}
|
||||
ReadWritePaths={{ host.data.systemd['ReadWritePaths'] }}
|
||||
BindPaths={{ host.data.systemd['BindPaths'] }}
|
||||
BindReadOnlyPaths={{ host.data.systemd['BindReadOnlyPaths'] }}
|
||||
ExecStart={{ host.data.systemd['ExecStart'] }}
|
||||
KillSignal=SIGQUIT
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in a new issue