mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-07 00:57:00 +02:00
Update to 2022-02-18 16:00
This commit is contained in:
34
roles/pgweb/templates/pgweb.service.j2
Normal file
34
roles/pgweb/templates/pgweb.service.j2
Normal file
@@ -0,0 +1,34 @@
|
||||
[Unit]
|
||||
Description=PgWeb Postgres Browser
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ pgweb_user }}
|
||||
Group={{ pgweb_user }}
|
||||
ExecStart={{ pgweb_root_dir }}/bin/pgweb \
|
||||
--listen {{ pgweb_port }} \
|
||||
--bind {{ (pgweb_src_ip | length > 0) | ternary('0.0.0.0','127.0.0.1') }} \
|
||||
--bookmarks-dir={{ pgweb_bookmarks_dir }} \
|
||||
{% if not pgweb_ssh_tunnels %}
|
||||
--no-ssh \
|
||||
{% endif %}
|
||||
--sessions
|
||||
RuntimeDirectory=pgweb
|
||||
RestartSec=30
|
||||
Restart=always
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHome=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectSystem=strict
|
||||
RestrictRealtime=true
|
||||
RestrictNamespaces=yes
|
||||
ReadWritePaths=/run
|
||||
PrivateTmp=true
|
||||
MemoryDenyWriteExecute=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user