From bb791ed2f46752c79bc547817db316f99f96e697 Mon Sep 17 00:00:00 2001 From: Laurent Ollagnier Date: Sun, 16 Nov 2025 18:54:51 +0100 Subject: [PATCH] (feat) VContainers : build VNode --- VContainers/VNode/Containerfile | 12 +++++++++ VContainers/VNode/pm2.json | 44 +++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 VContainers/VNode/Containerfile create mode 100644 VContainers/VNode/pm2.json diff --git a/VContainers/VNode/Containerfile b/VContainers/VNode/Containerfile new file mode 100644 index 00000000..97f45543 --- /dev/null +++ b/VContainers/VNode/Containerfile @@ -0,0 +1,12 @@ +FROM docker.io/keymetrics/pm2:latest-alpine + +## Bundle APP files +COPY VNode src +#COPY package.json . +COPY VContainers/VNode/pm2.json . +# +## Install app dependencies +RUN cd /src && npm install + +CMD [ "pm2-runtime", "start", "pm2.json" ] +#CMD [ "sh"] \ No newline at end of file diff --git a/VContainers/VNode/pm2.json b/VContainers/VNode/pm2.json new file mode 100644 index 00000000..07213210 --- /dev/null +++ b/VContainers/VNode/pm2.json @@ -0,0 +1,44 @@ +[ + { + "name": "buzzer-manager", + "script": "services/buzzer/buzzer-manager.js", + "cwd": "/src", + "watch": false, + "env": { + "NODE_ENV": "production" + } + }, + { + "name": "buzzer-watcher", + "script": "services/buzzer/buzzer-watcher.js", + "cwd": "/src", + "watch": false, + "env": { + "NODE_ENV": "production" + } }, + { + "name": "quizz-collector", + "script": "services/game/quizz-collector.js", + "cwd": "/src", + "watch": false, + "env": { + "NODE_ENV": "production" + } }, + { + "name": "score-manager", + "script": "services/game/score-manager.js", + "cwd": "src", + "env": { + "NODE_ENV": "production" + }, + "watch": false + }, + { + "name": "light-manager", + "script": "services/light/light-manager.js", + "cwd": "/src", + "watch": false, + "env": { + "NODE_ENV": "production" + } } +]