main
usa.yimian.xyz 3 years ago
parent 8ae2dc83c9
commit 95ba1f2133
  1. 15
      Dockerfile
  2. 12
      pm2.json

@ -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-director",
"script": "src/index.js",
"restart_delay": 43200000,
"instances": "1",
"env": {
"NODE_ENV": "development"
},
"env_production" : {
"NODE_ENV": "production"
}
}
Loading…
Cancel
Save