Hello everyone,
I hope someone knows the answer and will help me.
In lesson “Publishing changes”, I did every step as Mosh did. Have exact files as Mosh does. Yet when I compose the container up again and make changes to the codebase and save them, it doesnt trigger nodemon to rebuild the app.
This is my compose file section for backend
backend:
depends_on:
- db
build: ./backend
ports:
- 3001:3001
environment:
DB_URL: mongodb://db/vidly
command: ./docker-entrypoint.sh
volumes:
- ./backend:/app
And this is my Dockerfile:
FROM node:14.16.0-alpine3.13
RUN addgroup app && adduser -S -G app app
USER app
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3001
CMD [“npm”, “start”]
Can anyone help please?