Docker concept questions - docker database and backup related questions hosted on NAS
Posted: Mon Jun 15, 2020 12:00 pm
Hi folks I am new to docker. There is a few questions that I have on my mind. If anyone can answer anyone of these please reply.
Background - I am running docker on an Asustor NAS - Nimbustor 2 with Portainer.
I want to run the following apps for example - Bitwarden - with Mariadb/MySQL, Wordpress - with phPMYAdmin - with MySQL, Bookstack with MySQL and Calibre web (I think this does not need a database? not sure)
Since most of these apps use database hence my database question
Question 1: Can I use an external database? Is it safe to use the host database? Database is on the host. I cannot get the container to access the host database.
Question 2: If I use a container Database (Mariadb container) can all of these 4 apps access this one container to store their data? Or do I require 4 containers running Mariadb one for each app?
Question 3: Is it possible to backup containers? How do I backup a database if it is in a container? Does the database store its data inside files? I am a noob when it comes to databases.
Question 4: Is it possible to administer a database using phPMYAdmin if it is running in a container?
Question 5: I will be using Bind volumes to store the data from these apps to a docker folder in my NAS under their respective directories. If I update a container or loose a container is all of my data safe in the NAS? Is it better to use docker volumes are they persistent? What is an NFS volume?
Sorry if some of these questions seems basic. I am willing to read the manual but some of the concepts are not clearly stated.
Thanks.
Background - I am running docker on an Asustor NAS - Nimbustor 2 with Portainer.
I want to run the following apps for example - Bitwarden - with Mariadb/MySQL, Wordpress - with phPMYAdmin - with MySQL, Bookstack with MySQL and Calibre web (I think this does not need a database? not sure)
Since most of these apps use database hence my database question
Question 1: Can I use an external database? Is it safe to use the host database? Database is on the host. I cannot get the container to access the host database.
Question 2: If I use a container Database (Mariadb container) can all of these 4 apps access this one container to store their data? Or do I require 4 containers running Mariadb one for each app?
Question 3: Is it possible to backup containers? How do I backup a database if it is in a container? Does the database store its data inside files? I am a noob when it comes to databases.
Question 4: Is it possible to administer a database using phPMYAdmin if it is running in a container?
Question 5: I will be using Bind volumes to store the data from these apps to a docker folder in my NAS under their respective directories. If I update a container or loose a container is all of my data safe in the NAS? Is it better to use docker volumes are they persistent? What is an NFS volume?
Sorry if some of these questions seems basic. I am willing to read the manual but some of the concepts are not clearly stated.
Thanks.