Tokiva-backend-Node / Dockerfile
anoderb
fix: change Docker base image to node:18-slim and install openssl to resolve Prisma library compatibility
f97c402
Raw
History Blame Contribute Delete
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"]