File size: 449 Bytes
81b66b7 | 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 | FROM node:20-slim
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install all dependencies (including devDependencies for build)
RUN npm ci
# Copy source code
COPY tsconfig.json ./
COPY src/ ./src/
# Build TypeScript
RUN npx tsc
# Remove devDependencies after build
RUN npm prune --production
# Hugging Face Spaces uses port 7860
ENV PORT=7860
ENV NODE_ENV=production
EXPOSE 7860
# Start the server
CMD ["node", "dist/server.js"]
|