-
-
Notifications
You must be signed in to change notification settings - Fork 839
feat: frontend docker to use nextjs production build #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughReplaced Changes
Sequence DiagramsequenceDiagram
actor Start as Entrypoint
participant FastAPI as FastAPI Backend
participant CeleryW as Celery Worker
participant CeleryB as Celery Beat
Start->>FastAPI: python main.py (capture PID)
FastAPI->>FastAPI: Initialize
Start->>Start: sleep 5 (wait for backend ready)
Start->>CeleryW: Start Celery Worker
Start->>Start: sleep 3 (settle)
Start->>CeleryB: Start Celery Beat
Start->>Start: wait -n (monitor all PIDs)
Note over FastAPI,CeleryB: New sequence: backend first, then workers
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Multi-stage Dockerfile requires careful validation of build stages and output handling. Docker-compose build-args flow and entrypoint sequencing need verification. Changes span multiple domains (build, runtime, configuration) but follow consistent patterns. Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by RecurseML
🔍 Review performed on dc4fe71..99ab6af
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (7)
• .env.example
• docker-compose.yml
• surfsense_backend/scripts/docker/entrypoint.sh
• surfsense_web/.dockerignore
• surfsense_web/Dockerfile
• surfsense_web/content/docs/docker-installation.mdx
• surfsense_web/next.config.ts
Description
feat: frontend docker to use nextjs production build
Motivation and Context
To make docker useable and fast
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR migrates the frontend Docker setup from development mode to a production build configuration for Next.js. The key change is transforming the Dockerfile to use a multi-stage build process that produces an optimized standalone production bundle instead of running
pnpm dev. The PR updates the Docker Compose configuration to passNEXT_PUBLIC_*environment variables as build arguments (required for Next.js static builds), removes volume mounts for the frontend, updates environment variable names for consistency (NEXT_PUBLIC_API_URL→NEXT_PUBLIC_FASTAPI_BACKEND_URL), and documents these changes in the installation guide. Additionally, the backend Docker entrypoint service startup order is adjusted, and volume mounts are refined for better separation.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
surfsense_web/next.config.tssurfsense_web/Dockerfilesurfsense_web/.dockerignoredocker-compose.yml.env.examplesurfsense_web/content/docs/docker-installation.mdxsurfsense_backend/scripts/docker/entrypoint.shsurfsense_backend/scripts/docker/entrypoint.shSummary by CodeRabbit
Chores
Documentation