chore: node 16

pull/21/merge
xiaojunnuo 2023-05-26 14:08:37 +08:00
parent ddf98ff593
commit 71a289b009
3 changed files with 10 additions and 8 deletions

View File

@ -1,12 +1,13 @@
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/node:16-alpine FROM registry.cn-shenzhen.aliyuncs.com/handsfree/node:16-alpine
RUN npm install cross-env -g --registry=https://registry.npmmirror.com #RUN npm install cross-env -g --registry=https://registry.npmmirror.com
RUN npm install pm2 -g --registry=https://registry.npmmirror.com #RUN npm install pm2 -g --registry=https://registry.npmmirror.com
#RUN pm2 install pm2-logrotate
ADD ./workspace/certd-server/ /app/ ADD ./workspace/certd-server/ /app/
WORKDIR /app/ WORKDIR /app/
ENV NODE_ENV production ENV NODE_ENV production
RUN yarn install -P --registry=https://registry.npmmirror.com RUN yarn install -P --registry=https://registry.npmmirror.com
CMD ["pm2-runtime", "start", "./bootstrap.js","--name", "certd","-i","1"] #CMD ["pm2-runtime", "start", "./bootstrap.js","--name", "certd","-i","1"]
CMD ["npm", "run","start"]

View File

@ -1,7 +1,8 @@
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest FROM registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
RUN npm install pm2 -g --registry=https://registry.npmmirror.com #RUN npm install pm2 -g --registry=https://registry.npmmirror.com
CMD ["pm2-runtime", "start", "./bootstrap.js","--name", "certd","-i","1"] EXPOSE 7001
#CMD ["pm2-runtime", "start", "./bootstrap.js","--name", "certd","-i","1","--", "-p", "7001"]
CMD ["node", "./bootstrap.js"]

View File

@ -4,7 +4,7 @@
"description": "fast-server base midway", "description": "fast-server base midway",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "cross-env NODE_ENV=production node ./bootstrap.js", "start": "node ./bootstrap.js",
"online": "cross-env NODE_ENV=production node ./bootstrap.js", "online": "cross-env NODE_ENV=production node ./bootstrap.js",
"online:preview": "NODE_ENV=preview node ./bootstrap.js", "online:preview": "NODE_ENV=preview node ./bootstrap.js",
"dev": "cross-env NODE_ENV=local midway-bin dev --ts --watchFile='../../core/pipeline/src,../../plugins/'", "dev": "cross-env NODE_ENV=local midway-bin dev --ts --watchFile='../../core/pipeline/src,../../plugins/'",