Answer the question
In order to leave comments, you need to log in
Does docker allow real-time work?
If you install node js, npm, mysql angular + nestjs + prisma orm in the docker container and run it, will it work without installation on the local (working PC) and update in real time? Or do you need to restart after writing new code?
Answer the question
In order to leave comments, you need to log in
Can. To do this, you need to tell docker with the -v flag that you want to monitor changes to such and such a folder.
docker run \
--name app \
--link mongodb \
-e MONGO_URL=mongodb \
-e PORT=4000 \
-p 4000:4000 \
-v `pwd`/nodejs-with-mongodb-api-example:/src \ # WORKDIR ./src будет синхронизированна с папкой nodejs-with-mongodb-api-example. комманда pwd перед ней вернет полный путь до корневого каталога, где лежит докерфайл
-v nodemodules:/src/node_modules \ # то же самое для node_modules
app npm run dev:watch
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question