Open ArtoszBart opened 1 month ago
Isn't this COPY . .
only going to copy the source once, when you build up the container?
https://github.com/ArtoszBart/next-issue/blob/2e6ac6b3f252f172327d0ec22d205ad46ce1df63/Dockerfile.dev#L6
I'm pretty sure that if you want "outside" changes to be reflected inside the container in real time (without rebuilding), you need to mount the directory as a volume instead of just copying it.
Isn't this
COPY . .
only going to copy the source once, when you start up the container? https://github.com/ArtoszBart/next-issue/blob/2e6ac6b3f252f172327d0ec22d205ad46ce1df63/Dockerfile.dev#L6I'm pretty sure that if you want "outside" changes to be reflected inside the container in real time (without restarting compose), you need to mount the directory as a volume instead of just copying.
Exactly. Volume mapping is in the docker-compose.yml file.
As I said earlier:
After saving changes in page.tsx on the PC, the .next/server/chunks/ssr on PC is updated same as page.tsx in container
Same problem here in nextjs 15 doesnt work wit turbopack in nextjs 14.2.5 its work
nvm after I mirrored this one it works somehow: volumes:
- ./:/app
- ./apps/web/node_modules:/app/apps/web/node_modules
- ./apps/web/.next:/app/apps/web/.next
Downgraded to next@14.2.16:
With:
volumes:
- ./:/app
After saving changes in page.tsx on the PC, the .next/server/app/page.js both on PC and container is updated same as page.tsx in container. However changes in app running inside container remains not updated in browser. After page reload i have:
Server Error
Error: Could not find the module "/app/node_modules/next/dist/client/components/app-router.js#" in the React Client Manifest. This is probably a bug in the React Server Components bundler.
The same error occurs with:
volumes:
- ./:/app
- ./node_modules:/app/node_modules
- ./.next:/app/.next
Having same issue with "next": "^15.0.0". Adding volume change is updated in docker but log never compile the new update.
Link to the code that reproduces this issue
https://github.com/ArtoszBart/next-issue
To Reproduce
docker-compose up
Current vs. Expected behavior
Hot reload should reload the page to show changes, but changes is not visible in the browser
Provide environment information
Which area(s) are affected? (Select all that apply)
Developer Experience
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
After saving changes in page.tsx on the PC, the .next/server/chunks/ssr on PC is updated same as page.tsx in container. However .next/server/chunks/ssr in container remains not updated.