thinking-model-client / Dockerfile
moelove's picture
init version
ddac6a2
raw
history blame
635 Bytes
# Build stage
FROM node:20 AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage
FROM node:20-slim
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install only production dependencies
RUN npm ci --production
# Copy built assets from builder stage
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/server ./server
# Expose the port your app runs on
EXPOSE 7860
# Set production environment
ENV NODE_ENV=production
# Start the server
CMD ["node", "server/index.js"]