Spaces:
Sleeping
Sleeping
anoderb
fix: change Docker base image to node:18-slim and install openssl to resolve Prisma library compatibility
f97c402 Download Dockerfile from Anoderb/Tokiva-backend-Node: direct link, hf CLI and curl.
- Browser
- Download file 544 Bytes
-
https://huggingface.co/spaces/Anoderb/Tokiva-backend-Node/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Anoderb/Tokiva-backend-Node/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Anoderb/Tokiva-backend-Node/resolve/main/Dockerfile
544 Bytes
| 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"] | |