How would Docker help with this? Genuinely curious.
I store them in bash scripts outside the repo that populate the relevant data into environment variables and execute the code. The code then references the environment variables.
> How about installing the required dependencies?
There are two kinds. On the OS level and on the platform level.
On the OS level, you can have a simple bash script. If you need something more complex, there are things like Chef/Puppet/etc.
On the platform level, you have NPM/Composer/PIP/etc which you can trigger with a simple cron script or with a git hook.
> There's the issue of deploying changes fast without leaving files in an inconsistent state
So the argument here is that you're replacing one file in one go vs possibly thousands? That in the latter scenario the user might hit code while it's in the process of being updated?
Ok. With docker, you would shut it down to update. You would have to.
Same goes for the traditional deployment? Shut it down, update, start it back up?
You can, of course, automate all of this with web hooks on Github/Bitbucket, for both docker and the traditional deployment.
The traditional deployment should also be faster, since it's an incremental compressed update being done through git.