title: Vue.js local development with docker-compose
body: <p>I tried to use <code>docker-compose</code> to develop locally. But I have to rebuild my code if sth change...so I need this &quot;hot reload&quot; function but I fail to implement it. Maybe someone can help me or give me some hints.
  I don't use <code>Nginx</code> as a Proxy (<code>Envoy</code>), just as the server.</p>
  <p><strong>Vue.js Docker</strong></p>
  <pre class="lang-dockerfile prettyprint-override"><code>    FROM node:lts-alpine as build-stage
      WORKDIR /app
      COPY package*.json ./
      RUN npm install
      COPY . .
      RUN npm run build
      
      FROM nginx:stable-alpine as production-stage
      COPY --from=build-stage /usr/app /usr/share/nginx/html
      EXPOSE 80
      CMD [&quot;nginx&quot;, &quot;-g&quot;, &quot;daemon off;&quot;]
  </code></pre>
  <p><strong>Docker-Compose File</strong></p>
  <pre class="lang-yaml prettyprint-override"><code>    version: '3.7'
      
      services:
        front-envoy:
          build:
            context: ./envoy
            dockerfile: Dockerfile-frontenvoy
          volumes:
            - ./envoy/front-envoy.yaml:/etc/front-envoy.yaml
          networks:
            - envoymesh
          expose:
            - &quot;80&quot;
            - &quot;8001&quot;
          ports:
            - &quot;8000:80&quot;
            - &quot;8001:8001&quot;
      
        frontend:
          container_name: frontend
          restart: always
          build:
            context: ./frontend
            dockerfile: Dockerfile
          volumes:
            - ./frontend:/app
            - /app/node_modules      
          networks:
            envoymesh:
              aliases:
                - frontend
          environment:
            - SERVICE_NAME=frontend   
            - CHOKIDAR_USEPOLLING=true    
          expose:
            - &quot;80&quot;
          ports:
            - &quot;8081:8081&quot;
      
      
      networks:
        envoymesh: {}
  </code></pre>
  <p>Thank you so much for the help</p>