fix: move prisma generate to builder stage, add migration and entrypoint, replace custom login with NextAuth credentials provider
This commit is contained in:
+5
-1
@@ -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"]
|
||||
Reference in New Issue
Block a user