From ec50d8e30601a2472cfa5f666805345a3cfcbe76 Mon Sep 17 00:00:00 2001 From: innotex Date: Thu, 5 Feb 2026 01:07:06 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20Corriger=20le=20chemin=20SERVER=5FDIR=20?= =?UTF-8?q?pour=20le=20d=C3=A9ploiement=20distant=20et=20ajouter=20configu?= =?UTF-8?q?ration=20systemd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.env.example | 8 +++++--- nationglory-admin.service | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 nationglory-admin.service diff --git a/backend/.env.example b/backend/.env.example index 2dacbf2..ff44342 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,6 +1,8 @@ -NODE_ENV=development -PORT=3000 +NODE_ENV=production +PORT=4001 SESSION_SECRET=your-very-secret-session-key-change-in-production -SERVER_DIR=/home/innotex/Documents/Projet/Serveur NationsGlory/NationsGlory_ServeurBuild_Red +# LOCAL: /home/innotex/Documents/Projet/Serveur NationsGlory/NationsGlory_ServeurBuild_Red +# REMOTE: /home/innotex/NationsGloryRED/NationsGlory_ServeurBuild_Red +SERVER_DIR=/home/innotex/NationsGloryRED/NationsGlory_ServeurBuild_Red RCON_HOST=localhost RCON_PORT=25575 diff --git a/nationglory-admin.service b/nationglory-admin.service new file mode 100644 index 0000000..045292e --- /dev/null +++ b/nationglory-admin.service @@ -0,0 +1,16 @@ +[Unit] +Description=NationsGlory Admin Web Interface +After=network.target + +[Service] +Type=simple +User=innotex +WorkingDirectory=/home/innotex/WebNationsGlory_Deploy/backend +ExecStart=/usr/bin/node src/server.js +Restart=always +RestartSec=10 +Environment="NODE_ENV=production" +Environment="PORT=4001" + +[Install] +WantedBy=multi-user.target