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