News for hackers. Stuff that matters.
Re:Running Docker in production for 6 months by gtirloni on Friday November 11, 2016 @06:52AM (#12929827)
What do you use to restart the app inside the container when the code changes?
Re:Running Docker in production for 6 months by swap32 on Friday November 11, 2016 @06:56AM (#12929840)
Because since the source code folder was not mounted on the container, we had to rebuild the image with the updated code and then restart the container. On dev machines, since the source folder is mounted, django runserver's autoreload function works as usual.
Re:Running Docker in production for 6 months by majewsky on Friday November 11, 2016 @06:55AM (#12929838)
Grandparent is referring to hot reloading, wherein the application itself recognizes changed source files and reloads them on the fly. A common feature of server-side MVC frameworks like Django, Rails, etc.
Re:Running Docker in production for 6 months by vel0city on Friday November 11, 2016 @10:48AM (#12931662)
Often times I'll just run the container interactively with a shell and start/stop the app manually as if it was running locally while doing development work, almost as if its a super lightweight Vagrant setup.

So, something like docker run -it -v /path/to/source:/app my_image /bin/bash

Re:Running Docker in production for 6 months by alfonsodev on Friday November 11, 2016 @07:02AM (#12929873)
I use pm2 with --watch parameter inside the container, the code is mounted, so I can edit outside, but I don't need to restart the app. I do webpack -w locally though to simplify.