Files
huishou/Dockerfile
T
2026-07-27 14:07:26 +08:00

21 lines
596 B
Docker

FROM node:18
WORKDIR /app
COPY server/package*.json ./
RUN cat package.json && npm install && npm install xlsx@0.18.5 && npm ls xlsx
COPY server/ ./server/
COPY admin/ ./admin/
COPY dist/build/h5/ ./dist/build/h5/
COPY dist/build/mp-weixin/ ./dist/build/mp-weixin/
RUN mkdir -p /app/server/icons /app/server/data
EXPOSE 4000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:4000/api/prices', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"
CMD ["node", "server/server.js"]