Spaces:
Sleeping
Sleeping
File size: 543 Bytes
eb13f08 6a8eea9 eb13f08 6a8eea9 eb13f08 c101b9c eb13f08 c101b9c eb13f08 c101b9c eb13f08 c101b9c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | FROM node:20-slim AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install ALL dependencies (including dev for TypeScript build)
RUN npm ci
# Copy source code
COPY . .
# Build TypeScript
RUN npm run build
# Production stage
FROM node:20-slim
WORKDIR /app
COPY package*.json ./
# Install only production dependencies
RUN npm ci --omit=dev
# Copy built files from builder
COPY --from=builder /app/dist ./dist
# Expose port (HF Spaces uses 7860 by default)
EXPOSE 7860
ENV PORT=7860
CMD ["node", "dist/index.js"]
|