Dockerfile 583 B

1234567891011121314151617181920212223242526
  1. FROM node:20-alpine
  2. # ENV NODE_ENV=production
  3. ENV APP_PORT=8085
  4. ENV DB_HOST=127.0.0.1
  5. ENV DB_USER=root
  6. ENV DB_PWD=""
  7. ENV DB_DATABASE=4dkankan_motion
  8. ENV REDIS_URL=''
  9. ENV OSS_DOMAIN=https://ossxiaoan.4dage.com
  10. ENV OSS_FOLDER=/helperCenter
  11. WORKDIR /usr/src/app
  12. COPY ./packages/backend /usr/src/app
  13. RUN cd ${WORKDIR}
  14. # RUN npm install pnpm -g
  15. RUN npm config set registry https://registry.npmmirror.com
  16. RUN npm install pm2 -g
  17. RUN npm install
  18. RUN npm run build
  19. EXPOSE ${APP_PORT}
  20. CMD ["pm2-runtime", "ecosystem.config.js"]
  21. # CMD ["npm", "run", "pm2:start"]