main
usa.yimian.xyz 3 years ago
parent 6af8fb6184
commit 7404736202
  1. 15
      Dockerfile
  2. 12
      pm2.json
  3. 0
      src/framework.html
  4. 0
      src/index.html
  5. 4
      src/index.js

@ -0,0 +1,15 @@
FROM keymetrics/pm2:latest-alpine
# Bundle APP files
COPY src src/
COPY package.json .
COPY pm2.json .
# Install app dependencies
ENV NPM_CONFIG_LOGLEVEL warn
RUN npm install --production
# Show current folder structure in logs
RUN ls -al -R
CMD [ "pm2-runtime", "start", "pm2.json" ]

@ -0,0 +1,12 @@
{
"name": "wIoT-webpage",
"script": "src/index.js",
"restart_delay": 43200000,
"instances": "2",
"env": {
"NODE_ENV": "development"
},
"env_production" : {
"NODE_ENV": "production"
}
}

@ -1,4 +1,4 @@
const PORT = 4002;
const PORT = 80;
const KEY = 'abcde';
const PATH_LENGTH = 4;
@ -133,4 +133,4 @@ let render = function(template, data){
});
return s;
}
}
Loading…
Cancel
Save