21 lines
554 B
Docker
21 lines
554 B
Docker
FROM node:18-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
COPY server/package*.json ./
|
|
|
|
RUN npm install --production
|
|
|
|
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"] |