I did warn you yesterday @George, so here they are!
Let’s call it “All the questions about docker you wanted to ask but felt stupid asking” , or let’s just call this “the idiots guide to docker deployment”.
I can’t find any clear guides on this. There are vague references to these concepts but no clear guide. Perhaps some clarity may help lift the suspicion and trust issues some have with docker.
So there are lots of discussions about the benefits of docker but some issues seem to lack a good quality explanation of what happens
So we start with a basic site and do an initial upload to a server. (I use Digital Ocean)
So all the appropriate images are uploaded and the database with contents from your local container
That’s the simple bit
Now you update the code and re-deploy to your server
So what happens now…
Let’s start with your images
It’s a CMS, your live site has lots of images uploaded by users
My belief is that they are overwritten by the local copy?
So the solution is to use a mapped drive so the images are not overwritten?
Is there an alternative? (it’s another $10 per month)
If so, how?
It there any tutorial on this?
How do we deal with the new paths in components like image upload?
How do I set this up?
Assuming the developer has kept the database structures in sync using the database manager the structures of your development and production databases will be identical
You have lots of new database entries in your live site from users uploading information.
So does the deploy overwrite this with the local database?
If so how do you preserve your production data preventing it from being overwritten
I could probably play with this using test cases and work this out but I am sure someone can answer this easily and the answers will be of great benefit to the community (and me!)
I will be honest, not sure I will never trust docker 100%. I am too much of a control freak to leave these things to chance. I guess I will be obsessive about site/ data backups before every docker deploy; ftp is an old technology I get that but with ftp I could control every single element of what was uploaded and know that the database entries would be untouched. Docker, not so confident.
Sometimes I totally screw up a page (yes even I do that )
At present, if really bad, I would simply download the previous version from the server and start again
How would I do something like that with docker deployment or do I have to also use GIT to get older versions
Last updated: