2025-06-20 01:37:19 -05:00

21 lines
373 B
Docker

# Add multi-stage build
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
FROM node:18-alpine
WORKDIR /app
COPY --from=builder /app .
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s CMD wget -qO- http://localhost:3000/health || exit 1
# Start the application
CMD ["npm", "start"]