From 5dff6a66538cbce384f54faa16de523378ae7e3c Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Sat, 30 Sep 2023 16:25:44 +0200 Subject: [PATCH] Fix systemd service and updated README --- README.md | 7 +++++-- application/launcher_json.service | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 063cd6f..abd3390 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,11 @@ Replace `PORT` by the value you want to expose your app ### Systemd service -The repository contain a start.sh file to place in `/opt/launcher_json` folder, then place the launcher_json.service in `/etc/systemd/system` folder -and activate it using: ` +The repository contain a systemd service file launcher_json.service to place in `/etc/systemd/system` folder, then create the `launcher` user: + +`adduser launcher --disabled-password --disabled-login --no-create-home` and `usermod -a -G docker launcher` + +Then activate the service using: `systemctl enable --now launcher_json` diff --git a/application/launcher_json.service b/application/launcher_json.service index 0353a13..ee5d434 100644 --- a/application/launcher_json.service +++ b/application/launcher_json.service @@ -3,8 +3,8 @@ Description=Launcher_json Service [Service] -# Non-root user -User=www-data +# Non-root user, create a new user first and it to docker group +User=launcher # Workspace directory # Path to Reposilite executable/script and its configuration. ExecStart=/usr/bin/docker run -p 8090:8080 --restart unless-stopped -d launcher_json