Adding systemd service

This commit is contained in:
2023-09-30 00:04:41 +02:00
parent c64717c733
commit 6ada5287d7
3 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
# systemd service, to start the app at the launch of the system and restart it if it crash
[Unit]
Description=Launcher_json Service
[Service]
# Non-root user
User=www-data
# Workspace directory
WorkingDirectory=/opt/launcher_json
# Path to Reposilite executable/script and its configuration.
ExecStart=/opt/launcher_json/start.sh
# Policy
SuccessExitStatus=0
TimeoutStopSec=10
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target

3
application/start.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker run -p 8090:8080 -d --rm launcher_json