# Hot reloading doesn't work

**URL:** <https://forums.docker.com/t/hot-reloading-doesnt-work/133330>\
**Category:** Docker Desktop\
**Created:** [December 22, 2022, 7:49pm UTC](https://forums.docker.com/t/hot-reloading-doesnt-work/133330 "2022-12-22T19:49:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsrembrant](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/jsrembrant/32/33589_2.png) [@jsrembrant](https://forums.docker.com/u/jsrembrant)\
**Post date:** [December 22, 2022, 7:49pm UTC](https://forums.docker.com/t/hot-reloading-doesnt-work/133330/1 "2022-12-22T19:49:43Z")

</div>

First things first. I’m making my first steps in the world of Docker so please be indulgent to me if I say something stupid 🙂

I’m trying to figure out why hot reloading doesn’t work when I run docker-compose up --build.

My Docker file:

> _FROM node:alpine_  
> _WORKDIR ‘/app’_  
> _COPY package.json ._  
> _RUN npm install_  
> _COPY . ._  
> _CMD [“npm”, “run”, “start”]_

Docker-compose.yml

> version: ‘3’  
> services:  
> web:  
> build:  
> context: .  
> dockerfile: Dockerfile.dev  
> ports:  
> - “3000:3000”  
> volumes:  
> - /app/node\_modules  
> - .:/app  
> tests:  
> environment:  
> - WATCHPACK\_POLLING=true  
> build:  
> context: .  
> dockerfile: Dockerfile.dev  
> volumes:  
> - /app/node\_modules  
> - .:/app  
> command: [“npm”, “run”, “test”]

There’s an .env file in the root directory with WATCHPACK\_POLLING=true line included.

I can make changes in the content of the web page but not in the test file.

Can anyone explain why? What did I do wrong?

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [December 22, 2022, 7:56pm UTC](https://forums.docker.com/t/hot-reloading-doesnt-work/133330/2 "2022-12-22T19:56:51Z")

</div>

Please re-format your post according the following topic to make it easier to read:

> [@How to format your forum posts](https://forums.docker.com/t/how-to-format-your-forum-posts/127295):
>
> The Docker forum is using [Discourse](https://www.discourse.org/), which supports several ways to format your posts: Markdown; see [commonmark.org/help](https://commonmark.org/help/) for an interactive tutorial BBCode A small selection of HTML Any combination of the above Blank lines for formatting and readability Quite often you’ll need an empty line above specific formatting to make it work. You also need to type blank lines to create proper paragraphs; just pressing Return once and then typing a new block of text right below a previous block only …
