sofia-cloud / Dockerfile
Gmagl
fix: correcciones cr铆ticas y refactorizaci贸n de componentes
3eebcd0
FROM node:20-slim
WORKDIR /app
# Install dependencies for Prisma and native modules
RUN apt-get update && apt-get install -y openssl python3 make g++ && rm -rf /var/lib/apt/lists/*
# Copy package files
COPY package.json package-lock.json ./
# Install dependencies
RUN npm ci
# Copy source files
COPY . .
# Generate Prisma client
RUN npx prisma generate
# Build the application
RUN npm run build
# Environment variables
ENV NODE_ENV=production
ENV PORT=7860
ENV HOST=0.0.0.0
EXPOSE 7860
# Use entrypoint to handle migrations
ENTRYPOINT ["sh", "/app/entrypoint.sh"]
CMD ["node", ".next/standalone/server.js"]