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?

  • ShortN0te@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 months ago

    So from what i get reading your question, i would recommend reading more about container, compose files and how they work.

    To your question, i assume when you are talking about adding to container you are actually referring to compose files (often called ‘stacks’)? Containers are basically almost no computational overhead.

    I keep my services in extra compose files. Every service that needs a db gets a extra one. This helps to keep things simple and modular.

    I need to upgrade a db from a service? -> i do just that and can leave everything else untouched.

    Also, typically compose automatically creates a network where all the containing services of that stack communicate. Separating the compose files help to isolate them a little bit with the default settings.

    • mudeth@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      Aren’t containers the product of compose files? i.e. the compose files spin up containers. I understand the architecture, I’m just not sure about how docker streamlines separate containers running the same process (eg, mysql).

      I’m getting some answers saying that it deduplicates, and others saying that it doesn’t. It looks more likely that it’s the former though.