fix: move prisma generate to builder stage, add migration and entrypoint, replace custom login with NextAuth credentials provider

This commit is contained in:
Carlos
2026-07-10 21:56:45 +02:00
parent cef5402cfa
commit 583170efd1
8 changed files with 80 additions and 145 deletions
+5 -1
View File
@@ -12,6 +12,8 @@ RUN npm install --frozen-lockfile
FROM base AS builder
WORKDIR /app
ENV DATABASE_URL="postgresql://user:***@localhost:5432/1000apps"
# Install openssl for Prisma binary target detection
RUN apk add --no-cache openssl
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED=1
@@ -40,6 +42,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/pages ./pages
COPY --from=builder --chown=nextjs:nodejs /app/lib ./lib
COPY --from=builder --chown=nextjs:nodejs /app/components ./components
COPY --from=builder --chown=nextjs:nodejs /app/styles ./styles
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 3000
CMD ["npm", "run", "start"]
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]