title: How to Hot-Reload in ReactJS Docker
body: <p>This might sound simple, but I have this problem.</p>
  
  <p>I have two <code>docker</code> containers running. One is for my <code>front-end</code> and other is for my <code>backend</code> services.</p>
  
  <p>these are the <code>Dockerfile</code>s for both services.</p>
  
  <p><strong>front-end</strong> <code>Dockerfile</code> :</p>
  
  <pre><code># Use an official node runtime as a parent image
  FROM node:8
  
  WORKDIR /app
  
  # Install dependencies
  COPY package.json /app
  
  RUN npm install --silent
  
  # Add rest of the client code
  COPY . /app
  
  EXPOSE 3000
  
  CMD npm start
  </code></pre>
  
  <p><strong>backend</strong> <code>Dockerfile</code> :</p>
  
  <pre><code>FROM python:3.7.7
  
  WORKDIR /usr/src/app
  
  COPY requirements.txt ./
  RUN pip install --no-cache-dir -r requirements.txt
  
  COPY server.py /usr/src/app
  COPY . /usr/src/app
  
  EXPOSE 8083
  
  # CMD ["python3", "-m",  "http.server", "8080"]
  CMD ["python3", "./server.py"]
  </code></pre>
  
  <p>I am building images with the <code>docker-compose.yaml</code> as below:</p>
  
  <pre><code>version: "3.2"
  
  services:
  
    frontend:
      build: ./frontend
      ports:
        - 80:3000
      depends_on: 
        - backend
  
    backend: 
      build: ./backends/banuka
      ports: 
        - 8080:8083
  </code></pre>
  
  <p><strong>How can I make this two services <code>Update</code> whenever there is a change to front-end or back-end</strong>?</p>
  
  <p>I found this repo, which is a booilerplate for <code>reactjs</code>, <code>python-flask</code> and <code>posgresel</code>, which says it has enabled <code>Hot reload</code> for both <code>reactjs</code> frontend and <code>python-flask</code> backend. But I couldn't find anything related to that. Can someone help me?</p>
  
  <p><a href="https://github.com/tomahim/react-flask-postgres-boilerplate-with-docker/blob/master/docker-compose.yml" rel="noreferrer">repo link</a></p>
  
  <p>What I want is: <strong>after every code change the container should b e up-to-date automatically !</strong></p>