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
Getting razzle to run in Docker dev container #416
Comments
This issue has to do with a know problem running in docker. Running a container from a windows environment does not communicate the file events to the docker container with native functionality. The current work-around until native functionality is implemented is to use webpack polling in the docker container to allow webpack to poll for file system changes. Therefore, you have to add this to a razzle.config.js file to get hmr to see updates:
@jaredpalmer If this is something you would want to have a feature branch made for, I could work up something for a PR. Just let me know. Thanks for making this awesome starter kit. |
@alexjoyner holy moly. Thanks for figuring this out. I am not a javascript guy so this helped me out a ton. |
the config didnt work for me. looks like its updating but not seeing in the browser. following log shows startup and change to file.
|
From searching through the issues in this repo, it seems that some of the contributors are familiar with using docker, so maybe someone could give me a little help. I am trying to get a development workflow set up with docker and be able to have hmr with react inside a docker container. The goal is to get a working solution without to much hacking of the base razzle-create-app project. I have created my dockerfile as the following:
then i am starting the container with the dev directory mounted as a volume with
docker run --name hmr-test -d -p 8080:3000 -p 3001:3001 -v C:\Users\charles\Desktop\docker-hmr-test\ui-service:/home/node/app docker-hmr
The app runs and displays correctly, but razzle doesn't pick up any changes that are made on the local file system. If I run bash in the container and cat the files, I can see that they are updating correctly and razzle is starting from the correct directory in the container, so why doesn't razzle recognize the files and rebuild?
The text was updated successfully, but these errors were encountered: