Skip to content
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

Auto reload front end does not work when running containerized #3

Open
locusian opened this issue Jan 13, 2021 · 6 comments
Open

Auto reload front end does not work when running containerized #3

locusian opened this issue Jan 13, 2021 · 6 comments

Comments

@locusian
Copy link

From feedback we received from interview candidate---when making changes to the front end code during the exercise, the docker container for the front-end does not auto-reload. It does do this if you run npm on the host. These changes enable the container to automatically refresh with code changes, too. I have not tested this. I am also unable to create branches in this repo, so I'm creating this as an issue instead.

@invitae-viv can you please allow me to create branches and tag me once I have permission?

Rohit T also thinks he might have a better way of fixing this.

Diff:

diff --git a/docker-compose.yml b/docker-compose.yml
index 4a6100d..b14f6f1 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -15,6 +15,9 @@ services:
     volumes:
       - ./frontend:/opt/frontend
       - node-modules:/opt/frontend/node_modules
+    environment:
+      - NODE_ENV=development
+      - CHOKIDAR_USEPOLLING=true
     ports:
       - "3000:3000"
     restart: on-failure
@invitae-viv
Copy link

@locusian permission granted!

@locusian
Copy link
Author

@RohitTalwalkar I tried the front end app myself, both with and without this change. I see no difference. In my case, the auto-reload always works. Do you also want to investigate?

@RohitTalwalkar
Copy link

@locusian - oh, interesting, I wonder if it has to do with Docker versions - have you updated recently?

@locusian
Copy link
Author

@RohitTalwalkar I'm using docker desktop 2.4.0.0, docker engine 19.03.13. are you able to reproduce the issue?

@norlowski
Copy link

I have an upcoming interview - Adding these lines did allow npm to automatically detect my changes. Thanks.

Docker Desktop v20.10.6 on Windows 10

@RohitTalwalkar
Copy link

Thanks for checking out the fix @norlowski

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants