It might happen that even after proper volumes mapping configuration for React application like we did
here in the Docker compose file changes are not reflected in the running application.
And basically now see the text on the button is search.
And I saved changes in this file, but in the web browser I still see search, image, text in order
to fix such behavior.
If you see it on your computer as well, we need to add environment variable for react application inside
of the docker compose Yaml file for that.
Let's add here new key called environment like that.
And here will be environment variable called chaukidar underscore use polling like that and let's set
value of this environment variable to true like that.
Let's now save changes in this Docker compose file and now let's rerun Docker Compose.
And before doing that, let's actually compare our contents of this serdtse file here in our front end
application here.
C text search and let me do the same here in the share shell that is still open.
Let's cut search the JS file and here I see search image text and that means that now file on my computer
was not properly synchronized with file inside of the container.
That's why we need to add this option chowkidaar use polling.
This will actually increase a bit usage of the resources by this particular container.
But if on your computer changes are not synchronized, same as on mine, we need to go ahead with such
environment variable set up.
So let's go out from this shell exit and let's stop all running containers by entering command.
Docker compose down.
Let's bring them up again.
Now both containers are running and let's verify whether some changes will be seen or not after using
this environment variable.
Let's go back to web browser first and let's reload our application.
And after a lot I see search text on this button.
Let's try to change it.
Go to search JS file search, something like that.
Let's save changes.
Go back to web browser and almost instantly see changes here.
Let's change it to something else.
Search, Image.
Save.
Go back and almost instant change.
Let's finally go back to search Text on this button.
Save Go back and change is almost instant.
And now I don't see any files and file inside of the front end folder is almost instantly mirrored to
the container.
That's how Chowkidaar use polling option actually works in action, and in order to enable it, you
need to add environment variable using environment key in the Docker compose file and set value of the
variable Chowkidaar use polling to true also if you need, you could set values for other environment
variables in the same section environment.
Wonderful.
Let's now go ahead.
And next, let's add volumes mapping for API service because there we also need to apply changes after
we make them actually in the folder in our local folder here.
Let's proceed with that after the small pause.