Spaces:
Sleeping
Sleeping
File size: 544 Bytes
f97c402 ef874e6 | 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:18-slim
# Install openssl for Prisma compatibility
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy package files and install dependencies
COPY package*.json tsconfig.json ./
RUN npm ci
# Copy project files
COPY . .
# Generate Prisma Client
RUN npx prisma generate
# Build TypeScript to JavaScript
RUN npm run build
# Expose port 7860 (required by Hugging Face)
EXPOSE 7860
# Override PORT environment variable
ENV PORT=7860
# Run the backend server
CMD ["npm", "start"]
|