Fast Refresh with Nginx and Docker-compose
Unanswered
Macao paper wasp posted this in #help-forum
Macao paper waspOP
I'm currently developing my webapp through Docker compose with nginx. Fast refresh works fine when going through
localhost:3000 , which is the port that the application is deployed on. But when i try to hit localhost on port 80 (location that nginx is listening to) the fast refresh does not work. Is there any way to get fast refresh working or do I need to do some host name mapping to get it to work?6 Replies
European sprat
Why are you doing this?
If you're wanting a dev container why are you using nginx?
Macao paper waspOP
My original intent was to have everything configure to look like how I would have it once deployed, I'm sitll in the process of configuring nginx. Which was why I thought it would be okay to have it running inside the container, but it just sounds like it might be better to not have it enabled while working on the dev env
European sprat
It may be possible to run next dev server under nginx but I've never seen any docs speak to that. I think custom servers are only intended for production builds when you export as standalone
Macao paper waspOP
Thanks for confirming, I was hoping maybe there might be a configuration to enable fast reload with nginx, but it makes sense that it wouldnt work since nginx would need to listen in on any changes that next sends during the fast reload process.
having the dev server working on docker is often more trouble than its worth it. the production server works entirely different from the dev server so you don't really get a lot of benefit from working on "the same environment"