Spaces:
Build error

primestake / backend /Dockerfile
PrimeStake Deployer
Deploy to Hugging Face Spaces: Dockerized Backend with Redis/SQLite
1a730c0
Raw History Blame Contribute Delete
557 Bytes
# Use official Node.js runtime
FROM node:18
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Generate Prisma Client
RUN npx prisma generate
# Create data directory for SQLite
RUN mkdir -p prisma
# Expose the port Hugging Face expects
EXPOSE 7860
# Environment variables
ENV PORT=7860
ENV NODE_ENV=production
# Start command: Migrate DB -> Seed Users -> Start Server
CMD ["sh", "-c", "npx prisma migrate deploy && node create_users.js && npm start"]