How to watch file changes developing in NestJs app inside Docker container

I’m having a problem with NestJS and Docker. I want to run the development script via npm start: dev but the problem is that the app runs ok but it dosn’t detect any change in the souce files, so I cant use it to develop my app.

This is part of my docker-compose.yml:

messages:
   image: c2c/messages:v1
   command: npm run start:dev
   build:
     context: ./services/c2c-server-messages
     dockerfile: Dockerfile
   container_name: c2c_server_messages
   depends_on:
     - postgres
     - nginx
   networks:
     c2c_net:
       ipv4_address: 172.28.1.5

And the Dockerfile of my Nest app:

FROM node:10-alpine
WORKDIR /api/messages
ADD . .
RUN npm install
EXPOSE 3000
CMD ["npm", "run", "start"]

My npm start:dev script in package.json:

"start:dev": "tsc-watch -p tsconfig.build.json --onSuccess "node dist/main.js"",

The console output show me this, but the app dosn’t detect the file changes:

c2c_server_messages | 7:26:29 PM - Found 0 errors. Watching for file changes.
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [NestFactory] Starting Nest application...
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [InstanceLoader] TypeOrmModule dependencies initialized +63ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [InstanceLoader] AppModule dependencies initialized +2ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [InstanceLoader] TypeOrmCoreModule dependencies initialized +151ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [InstanceLoader] TypeOrmModule dependencies initialized +1ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [InstanceLoader] MessageModule dependencies initialized +2ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [RoutesResolver] AppController {/}: +8ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [RouterExplorer] Mapped {/, GET} route +6ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [RoutesResolver] MessageController {/messages}: +1ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [RouterExplorer] Mapped {/, POST} route +2ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [RouterExplorer] Mapped {/all, GET} route +2ms
c2c_server_messages | [Nest] 36   - 07/31/2019, 7:26 PM   [NestApplication] Nest application successfully started +5ms

Source: StackOverflow