On 10/17/18, Vk3jed said the following...
I also need to share why (I think) Docker is great - I pretty much ru everything under docker :)
That would be a good idea. The question is "Why should we bother?" And go on, state your case. :)
Yeah, the main reason I do so - is for "redundancy". Docker does make you consider your application deployment a little more seriously. But by doing
so, it gives you options.
The deployment considerations is that you separate out "application", "configuration" and "data" - you'll see me post around this a few times as I work out new packages (to me).
"Applications" are static by nature. EG: Mystic 1.12A39 would be a "container" representing v1.12a39 of the Mystic application. (It doesnt change.)
"Configuration" is "mostly" static by nature - but I may want to change/tweak parameters sometimes. EG: Enabling a "port", changing the path to my "data" etc...
"Data" belongs to the version of an application. So everything in my data dir is for the version of the application in question. (EG: mystic-v1.12a39 currently) - so if I back it up, I know that anytime in the future, I can restore it, bring back container "Mystic 1.12a39" and it will run. (And if I set up the container properly - guaranteed!)
What docker gives me most is options. Lets say I want to move my app from PC1 to PC2 - all I need to do is backup/restore (or clone) the data from PC1 to
PC2 (normally in a single root directory) - pull the container onto PC2 and away I go. The network address may have changed, but everything else is the same "from inside the container". The container thinks it was "stopped" and then "started", but did not realise it physically moved hosts.
Where it comes really useful is "upgrading". Lets say Mystic v2 comes out
that runs an "update process" against v1.12a39 to make it v2. I can build the v2 container, then:
1 Backup my data of the current (LVS snapshot is great here)
2 Pull the v2 container and run the upgrade
If things go pear shaped, I restore the data (or revert the snapshot), pull
the old container, and happy days, continue on the old version as if nothing happened. (The container thinks it stopped and then started.)
What's better, I can test all this out on the same host (or a different one), and not doing it to the live app, but a "test" container (where I have made a copy of my data dir) - and if it all works out, I can then make that test app "live" or do it again to my "live" data.
That's just one of the reasons I like docker...
...deon
--- Mystic BBS v1.12 A39 2018/04/21 (Raspberry Pi/32)
* Origin: Chinwag | MysticBBS in Docker on a Pi! (21:2/116.1)