10
submitted 2 years ago* (last edited 2 years ago) by mudeth@lemmy.ca to c/selfhosted@lemmy.world

Hi, I'm just getting started with Docker, so apologies in advance if this seems silly.

I used to self-host multiple services (RSS reader, invoicing software, personal wiki) directly on a VPS using nginx and mariadb. I messed it up recently and am starting again, but this time I took the docker route.

So I've set up the invoicing software (InvoiceNinja), and everything is working as I want.

Now that I want to add the other services (ttrss and dokuwiki), should I set up new containers? It feels wasteful.

Instead, if I add additional configs to the existing servers that the InvoiceNinja docker-compose generated (nginx and mysql), I'm worried that an update to Invoiceninja would have a chance of messing up the other setups as well.

It shouldn't, from my understanding of how docker containers work, but I'm not 100% sure. What would be the best way to proceed?

you are viewing a single comment's thread
view the rest of the comments
[-] bjorney@lemmy.ca 3 points 2 years ago

it won't necessarily take twice the resources of a single mysql container

It will as far as runtime resources

You can (and should) just use the one MySQL container for all your applications. Set up a different database/schema for each container

[-] mudeth@lemmy.ca 1 points 2 years ago

I'm getting conflicting replies, so I'll try running separate containers (which was the point of going the docker way anyway - to avoid version dependency problems).

If it doesn't scale well I may just switch back to non-container hosting.

[-] bjorney@lemmy.ca 1 points 2 years ago

To elaborate a bit more, there is the MySQL resource usage and the docker overhead. If you run two containers that are the same, the docker overhead will only ding you once, but the actual MySQL process will consume its own CPU and memory inside each container.

So by running two containers you are going to be using an extra couple hundred MB of RAM (whatever MySQL's minimum memory footprint is)

this post was submitted on 18 Jan 2024
10 points (81.2% liked)

Selfhosted

60723 readers
307 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS