Files
tiny-webhook/Dockerfile
Cauê Faleiros 12aa5c7f83
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m23s
Make product structure sync use product export
2026-07-23 14:03:43 -03:00

32 lines
630 B
Docker

# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files and install all dependencies (including devDependencies for TypeScript)
COPY package.json ./
RUN npm install
# Copy source code and build
COPY . .
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
# Copy package files and install ONLY production dependencies
COPY package.json ./
RUN npm install --omit=dev
# Copy built code from the builder stage
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/data ./data
# Expose the port the app runs on
EXPOSE 3000
# Command to run the application
CMD ["npm", "start"]