Dockerfile-promo-sdk 746 B

123456789101112131415161718192021
  1. FROM node:alpine
  2. ARG DB_CLUSTER=mongodb1:27017,mongodb2:27018,mongodb3:27019
  3. ARG SERVER_PORT=9005
  4. ARG CONTENT_DIR=web-sdk-demo
  5. RUN apk add --no-cache curl
  6. USER node
  7. HEALTHCHECK --start-period=40s --interval=15s --timeout=5s --retries=2 CMD curl -f 127.0.0.1:${SERVER_PORT} || exit 1
  8. COPY ${CONTENT_DIR}/js /home/node/promo-sdk/js
  9. COPY ${CONTENT_DIR}/page /home/node/promo-sdk/page
  10. COPY ${CONTENT_DIR}/static /home/node/promo-sdk/static
  11. COPY ${CONTENT_DIR}/style /home/node/promo-sdk/style
  12. COPY ${CONTENT_DIR}/node_modules /home/node/promo-sdk/node_modules
  13. COPY ${CONTENT_DIR}/server.js /home/node/promo-sdk/server.js
  14. COPY ${CONTENT_DIR}/package.json /home/node/promo-sdk/package.json
  15. WORKDIR /home/node/promo-sdk
  16. CMD ["npm", "run", "start"]