master
cn.yimian.xyz 4 years ago
parent 42a502e3f2
commit d177416201
  1. 16
      Dockerfile
  2. 11
      pm2.json
  3. 0
      src/index.js
  4. BIN
      upload/240f28404d99089db84da454cafa81b1
  5. BIN
      upload/48381fba31b4c689073665783d134949

@ -0,0 +1,16 @@
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
RUN pm2 install pm2-auto-pull
# Show current folder structure in logs
RUN ls -al -R
CMD [ "pm2-runtime", "start", "pm2.json" ]

@ -0,0 +1,11 @@
{
"name": "upload-api",
"script": "src/index.js",
"instances": "2",
"env": {
"NODE_ENV": "development"
},
"env_production" : {
"NODE_ENV": "production"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Loading…
Cancel
Save