mirror of
https://github.com/lucaspalomodevelop/JSSTE_APP.git
synced 2026-03-13 00:07:22 +00:00
add docker stuff | edit something
This commit is contained in:
parent
87a9aaa196
commit
8694ced81d
@ -1,7 +1,7 @@
|
||||
{
|
||||
"webserver":{
|
||||
"port":8080,
|
||||
"host":"localhost",
|
||||
"host":"127.0.0.1",
|
||||
"caching":false
|
||||
},
|
||||
"jsste":{
|
||||
|
||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
version: '3'
|
||||
services:
|
||||
jsste:
|
||||
build: .
|
||||
volumes:
|
||||
- ./:/app
|
||||
ports:
|
||||
- "8080:8080"
|
||||
10
dockerfile
Normal file
10
dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM node:18
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN npm install
|
||||
WORKDIR /app/dashboard
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
CMD ["npm", "start"]
|
||||
@ -25,9 +25,7 @@ function updateData() {
|
||||
console.log = function (d) {
|
||||
name = "log_" + moment().format("YYYY-MM-DD") + ".log";
|
||||
|
||||
d = `[ ${moment().format(
|
||||
"YYYY-MM-DD HH:mm:ss"
|
||||
)}] [${currentuuid}] ${util.format(d)} \n`;
|
||||
d = `[ ${moment().format("YYYY-MM-DD HH:mm:ss")}] ${util.format(d)} \n`;
|
||||
log_file.write(d);
|
||||
log_stdout.write(d);
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
let JssteState = { statusMSG: "could not started JSSTE", status: 1 };
|
||||
let JssteState = { statusMSG: "could not started JSSTE", status: 1, pageStatus:[] };
|
||||
let WebsrvState = { port: undefined, status: undefined };
|
||||
|
||||
module.exports = {
|
||||
|
||||
@ -5,7 +5,7 @@ let jobs = require("./helper/cronjobs");
|
||||
let open = require("open");
|
||||
let os = require("os");
|
||||
|
||||
os.setPriority(os.constants.priority.PRIORITY_HIGHEST);
|
||||
//os.setPriority(os.constants.priority.PRIORITY_HIGHEST);
|
||||
|
||||
/**
|
||||
* @description
|
||||
|
||||
@ -8,6 +8,10 @@ app.specialvars = function (variable_regex, cb, instance = app.instance) {};
|
||||
* @param {*} pagecode
|
||||
* @param {*} templatecode
|
||||
*/
|
||||
app.render = function (pagecode, templatecode) {};
|
||||
app.render = function (pagecode, templatecode) {
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
module.exports = app;
|
||||
|
||||
@ -26,9 +26,9 @@ module.exports = function (conf) {
|
||||
app.use(bodyParser.json());
|
||||
app.use(cookieParser());
|
||||
app.use("/api", internalRouter);
|
||||
app.use("/dashboard", express.static(__dirname + "/../../dashboard"));
|
||||
app.use("/dashboard", express.static(__dirname + "/../../dashboard/build"));
|
||||
app.get("/dashboard/*", (req, res) => {
|
||||
let indexPath = path.join(__dirname + "/../../dashboard/index.html");
|
||||
let indexPath = path.join(__dirname + "/../../dashboard/build/index.html");
|
||||
res.sendFile(indexPath);
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user