use DEV_CONTAINER env var

This commit is contained in:
Alexander Bentkamp
2023-06-13 12:58:31 +02:00
parent 620cf0597e
commit b5b3426856
+5 -2
View File
@@ -28,9 +28,8 @@ const games = {
dir: "../../../../NNG4",
queueLength: 5
},
"g/local/game": {
"g/dev/container": {
dir: "../../../../game",
queueLength: 5
}
}
@@ -111,6 +110,10 @@ wss.addListener("connection", function(ws, req) {
const repo = reRes[2]
const tag = `g/${owner.toLowerCase()}/${repo.toLowerCase()}`
if (isDevelopment && process.env.DEV_CONTAINER) {
tag = `g/dev/container`
}
let ps;
if (!queue[tag] || queue[tag].length == 0) {
ps = startServerProcess(tag)