Spaces:
Sleeping
Sleeping
anoderb
fix: change Docker base image to node:18-slim and install openssl to resolve Prisma library compatibility
f97c402 | 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"] | |