Ryan

@serge do you run exec in your container, or what?

serge

Depending on what I do, but I would just use the official node container - https://hub.docker.com/_/node and then run whatever I want with docker-compose run

Show 1 attachment(s)
hub.docker.com  
node - Docker Hub

Node.js is a JavaScript-based platform for server-side and networking applications.

Hide attachment content
serge

if you run it with network_mode: host, then you don't even need to set up any ports manually

serge

I've been running hot-reloading in docker, but I'm on Linux, not on mac, so my fs binding works much better

serge

though, npm watch should usually work with nfs just fine

serge

I guess the only difference between running hot-reloading in docker and on the host machine is that you need to bind the port and mount the filesystem. If you're on on mac, you may be using NFS which may require some extra setup for picking up filesystem changes properly

MichalKleiner

nothing to show publicly, sorry… not that it’s secret but we don’t have anything published anywhere for this kind of things..

Ryan

@MichalKleiner I tried something similar, but with no luck. Do you have a project o github that's doing it, or are they all NDA projects?

MichalKleiner

in past we exposed and mapped 35789 or whatever is the standard livereload port is and I think it worked fine…

MichalKleiner

as in running node build inside a container and hot reload pages when files/component change?

Ryan

Has anyone set up hot reloading in their Docker instances before?