Skip to content

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

@locusian

Description

@locusian

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions