Arbadacarba Posted May 10 Share Posted May 10 Has anyone tried or is there any benefit too: Runing a single SQL instance (PostgreSQL) for multiple dockers? I'm running NextCloud with MariaDB and want to play with Immich, but imagine I'm being a little redundant and wasteful with running two separate SQL engines. Thanks Quote Link to comment
Kilrah Posted May 10 Share Posted May 10 (edited) I like using only one of each, but still have to run both PG and mariadb since some containers only support one or the other. I prefer using mariadb whenever I can, much simpler. Edited May 10 by Kilrah Quote Link to comment
JonathanM Posted May 10 Share Posted May 10 1 hour ago, Arbadacarba said: I'm being a little redundant and wasteful with running two separate SQL engines. If you duplicate an existing container, they share the data layers in the docker image. There is practically no redundancy and waste when doing this, the only "extra" would be the repeated stuff in the appdata folders. 1 Quote Link to comment
Arbadacarba Posted May 10 Author Share Posted May 10 OK, so running two instances of PostgreSQL is better than runing one PostgreSQL and one MariaDB But there is no advantage to running just one instance of PestgreSQL instead of two... I don't know if it's even possible to set up two data bases in one PostgreSQL docker. Quote Link to comment
Kilrah Posted May 10 Share Posted May 10 36 minutes ago, Arbadacarba said: I don't know if it's even possible to set up two data bases in one PostgreSQL docker. Of course it is but you need either the command line or a tool like pgadmin, and roles/perms in PG are pretty complicated to set up. 1 Quote Link to comment
Arbadacarba Posted May 24 Author Share Posted May 24 OK, so I gave it a try... Deleted ALL my dockers that use SQL... Deleted MariaDB... Cleared the old folders and templates. Installed Postgres15 Installed PGadmin in PG admin created a new Database for FreshRSS Installed FreshRSS and gave it access to the Postgres Database Success Created a Database for Nextcloud Installed Nextcloud and gave it access to the Postgres Database... OK, this was not as difficult as I had expected... Now on to Immich... Wish me luck Quote Link to comment
JonathanM Posted May 24 Share Posted May 24 10 hours ago, Arbadacarba said: Wish me luck Better get familiar with database backup and restore using PGadmin. If one of your containers that shares your database gets messed up, you will need to dig in to database repair instead of taking the easy way out and blowing away the database and starting over. Not that it's extremely difficult, just more work to keep multiple databases in a single container maintained vs. the ability to work on one at a time where there is no chance of interaction between the database you are having problems with and the ones that are running fine. As I said before, there is almost no benefit to running a single container with multiple databases vs. using multiple identical containers each with their own database, and plenty of downsides. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.