Answer the question
In order to leave comments, you need to log in
Docker how best to separate containers?
Hello.
I have a web application, API (ASP NET CORE) + monga, I divided them into containers and launched everything - everything seems to be fine, but I don’t want to make mistakes that will later come out sideways.
1) The monga image was obtained from here https://hub.docker.com/_/mongo
in their examples there is not a word about the fact that Volumes needs to be thrown in order not to lose data after a reboot. At the beginning, I messed up, and then I decided to try as they suggested in the examples, and lo and behold, reloading the container does not delete the database data. Do I have a risk of losing the database? how to do it anyway?
2) from the api, I access the database not at the local address, but through the external IP, am I losing something? whether it is necessary to do through local access?
3) How to properly update the working container? how can i automate this for google cloud?
now I manually delete the image, download a new one, delete the container, start a new one
4) Is it worth leaving the previous container to return? or can I 100% trust docker to work?
if everything was ok on the virgin, then it will be ok in the sale?
Answer the question
In order to leave comments, you need to log in
You can lose the base in the cloud at any time, for this you need to make a backup)
What's the difference from there you took the image, volumes, etc., you still throw it yourself
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question