Updated Nubian to run in a docker composition

This commit is contained in:
Dunemask 2021-07-24 19:05:16 -06:00
parent ea2cefb8f3
commit 9b964af050
5 changed files with 10 additions and 6 deletions

View file

@ -1,9 +1,10 @@
FROM node:latest
RUN apt-get update && apt-get upgrade -y
WORKDIR /dunestorm/nubian
COPY src /dunestorm/nubian
COPY package.json /dunestorm/nubian/
COPY src /dunestorm/nubian/src
RUN npm i
CMD ["npm","start"]
# EXPOSE PORTS
EXPOSE 4001
EXPOSE 52001

View file

@ -4,7 +4,7 @@
"description": "Dunemask Web server",
"main": "server.js",
"scripts": {
"start": "node server.js --no-warnings",
"start": "node src/server.js --no-warnings",
"test-server": "nodemon src/server.js"
},
"repository": {

View file

@ -11,11 +11,14 @@ const AdmZip = require("adm-zip");
const Pharaoh = require("../egypt/pharaoh");
const desertConfig = require("../egypt/desert_config.json");
const config = require("../config.json");
// Create the desert if it doesn't exist
if (!fexists(desertConfig.desertPath)) mkdir(desertConfig.desertPath);
//Constants
const fileStorage = new Pharaoh(
resolvePath(desertConfig.desertPath),
desertConfig.schema
);
const zipDir = resolvePath(config.Storage.ZipPath);
function addFile(fileData) {
fileStorage.addEntry(fileData.fileUuid, "files", fileData);

View file

@ -10,11 +10,11 @@
"ZipDownloadExpire": 720000
},
"Server": {
"Port": 4000,
"Port": 52001,
"Debug": false,
"BodyLimit": "5mb",
"ZipRemovalInterval": 1800000,
"jwtHeader": "authorization",
"authServer": "http://localhost:4001/api/user/data"
"authServer": "http://cairo.dunestorm.net:52000/api/user/data"
}
}

View file

@ -1,5 +1,5 @@
{
"desertPath": "desert/",
"desertPath": "src/desert/",
"schema": {
"files": {
"tokenList": "abcdefghijklmnopqrstuvwxyz0123456789",