File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,9 @@ COPY --from=backend-builder /app/.venv /app/.venv
5454COPY backend/*.py ./
5555
5656# Copy built frontend from previous stage
57- COPY --from=frontend-builder /app/frontend/.next ./.next
58- COPY --from=frontend-builder /app/frontend/public ./public
59- COPY --from=frontend-builder /app/frontend/package.json ./package.json
60- COPY --from=frontend-builder /app/frontend/node_modules ./node_modules
57+ COPY --from=frontend-builder /app/frontend/.next/standalone /app/
58+ COPY --from=frontend-builder /app/frontend/public /app/public
59+ COPY --from=frontend-builder /app/frontend/.next/static /app/.next/static
6160
6261# Expose ports
6362EXPOSE 8000 3000
@@ -68,13 +67,14 @@ ENV PYTHONPATH=/app \
6867 UVICORN_PORT=8000 \
6968 PATH="/app/.venv/bin:$PATH" \
7069 VIRTUAL_ENV=/app/.venv \
71- NODE_ENV=production
70+ NODE_ENV=production \
71+ PORT=3000
7272
7373# Create startup script for better process management
7474RUN echo '#!/bin/bash\n \
7575 uv run uvicorn main:app --host $UVICORN_HOST --port $UVICORN_PORT &\n \
7676 BACKEND_PID=$!\n \
77- cd /app && PORT=3000 npx next start &\n \
77+ node /app/server.js &\n \
7878 FRONTEND_PID=$!\n \
7979 wait $BACKEND_PID $FRONTEND_PID' > /app/start.sh && chmod +x /app/start.sh
8080
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const withNextIntl = createNextIntlPlugin('./i18n.ts');
44
55/** @type {import('next').NextConfig } */
66const nextConfig = {
7+ output : 'standalone' ,
78 compiler : {
89 removeConsole :
910 process . env . NODE_ENV === "production"
You can’t perform that action at this time.
0 commit comments