MINGLEHUB / Dockerfile
VISHAL18for4's picture
Upload Dockerfile
fd37819 verified
raw
history blame contribute delete
459 Bytes
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"]