Spaces:
Sleeping
Sleeping
Caner Giden commited on
Commit ·
c38e534
1
Parent(s): 418fa3b
Simplify Dockerfile: Remove unnecessary file copies, Next.js bundles everything in .next
Browse files22 unmodified lines23242526272829303132333435363738394041424344451 unmodified line474849505122 unmodified linesWORKDIR /appENV NODE_ENV=production# Gerekli dosyaları kopyalaCOPY --from=builder /app/package.json ./COPY --from=builder /app/package-lock.json* ./COPY --from=builder /app/.next ./.nextCOPY --from=builder /app/public ./publicCOPY --from=builder /app/next.config.js ./COPY --from=builder /app/next-env.d.ts ./COPY --from=builder /app/tsconfig.json ./COPY --from=builder /app/tailwind.config.ts ./COPY --from=builder /app/postcss.config.js ./COPY --from=builder /app/store ./storeCOPY --from=builder /app/lib ./libCOPY --from=builder /app/types ./typesCOPY --from=builder /app/components ./componentsCOPY --from=builder /app/app ./app# Production dependencies yükleRUN npm install --omit=dev# HF Spaces için port1 unmodified lineENV HOSTNAME="0.0.0.0"EXPOSE 7860# Next.js prod server'ı çalıştırCMD ["npx", "next", "start", "-p", "7860", "-H", "0.0.0.0"]22 unmodified lines2324252627282930313233341 unmodified line363738394022 unmodified linesWORKDIR /appENV NODE_ENV=production# Sadece ihtiyaç duyulan dosyalarCOPY --from=builder /app/package.json package-lock.json* ./COPY --from=builder /app/.next ./.nextCOPY --from=builder /app/public ./publicCOPY --from=builder /app/next.config.* ./RUN npm install --omit=dev# HF Spaces için port1 unmodified lineENV HOSTNAME="0.0.0.0"EXPOSE 7860# Next.js prod server'ı HF portunda çalıştırCMD ["npx", "next", "start", "-p", "7860", "-H", "0.0.0.0"]
Dockerfile+5-16