add prisma cli to dependencies, make zod checks more permissive
This commit is contained in:
+6
-9
@@ -25,8 +25,8 @@ RUN npx tsc
|
||||
# Production stage
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install OpenSSL for Prisma and create non-root user
|
||||
RUN apk add --no-cache openssl && \
|
||||
# Install OpenSSL for Prisma and su-exec, create non-root user
|
||||
RUN apk add --no-cache openssl su-exec && \
|
||||
addgroup -g 1001 -S nodejs && \
|
||||
adduser -S nodejs -u 1001
|
||||
|
||||
@@ -51,17 +51,14 @@ COPY --from=builder /app/src/generated ./dist/generated
|
||||
# Generate Prisma Client in production (updates node_modules)
|
||||
RUN npx prisma generate
|
||||
|
||||
# Create necessary directories and set proper ownership
|
||||
RUN mkdir -p /app/uploads /app/prisma && \
|
||||
chown -R nodejs:nodejs /app
|
||||
# Create necessary directories (ownership will be set in entrypoint)
|
||||
RUN mkdir -p /app/uploads /app/prisma
|
||||
|
||||
# Copy and set permissions for entrypoint script
|
||||
COPY docker-entrypoint.sh ./
|
||||
RUN chmod +x docker-entrypoint.sh && \
|
||||
chown nodejs:nodejs docker-entrypoint.sh
|
||||
RUN chmod +x docker-entrypoint.sh
|
||||
|
||||
# Switch to non-root user
|
||||
USER nodejs
|
||||
# REMOVED: USER nodejs (We must stay root to fix permissions in entrypoint)
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user