Spaces:
Running
Running
File size: 459 Bytes
fd37819 | 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 | FROM node:20-alpine
WORKDIR /app
# Copy package files first (better Docker caching)
COPY package.json ./
# Install all dependencies including devDependencies (needed for build)
RUN npm install
# Copy all project files
COPY . .
# Build the React frontend into /dist
RUN npm run build
# HuggingFace Spaces REQUIRES port 7860
EXPOSE 7860
ENV NODE_ENV=production
ENV PORT=7860
# Start server (tsx runs TypeScript directly)
CMD ["npx", "tsx", "server.ts"]
|