Run the unit as a rootless user service
WorkingDirectory uses %h, the unit installs under default.target, and it retries a failed start with a limit, the same as the other services on the VPS.
This commit is contained in:
1 parent
e08f9fafa9
commit
7f930933b4
1 file changed
+7
-2
@@ -2,14 +2,19 @@
|
|||||||
Description=Podman Compose: Bang
|
Description=Podman Compose: Bang
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
WorkingDirectory=/home/gib/Server/Search/Bang/docker
|
WorkingDirectory=%h/Server/Search/Bang/docker
|
||||||
ExecStart=/usr/bin/podman compose up -d
|
ExecStart=/usr/bin/podman compose up -d
|
||||||
ExecStop=/usr/bin/podman compose down
|
ExecStop=/usr/bin/podman compose down
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
TimeoutStartSec=900
|
||||||
TimeoutStopSec=60
|
TimeoutStopSec=60
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=30
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=default.target
|
||||||
Reference in new issue
Block a user