Jump to content

Streamlining SQL


Recommended Posts

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

Link to comment
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.

  • Like 1
Link to comment

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.

Link to comment
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.

  • Like 1
Link to comment
  • 2 weeks later...

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

Link to comment
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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...