I have many services running on my server and about half of them use postgres. As long as I installed them manually I would always create a new database and reuse the same postgres instance for each service, which seems to me quite logical. The least amount of overhead, fast boot, etc.

But since I started to use docker, most of the docker-compose files come with their own instance of postgres. Until now I just let them do it and were running a couple of instances of postgres. But it’s kind of getting rediciolous how many postgres instances I run on one server.

Do you guys run several dockerized instances of postgres or do you rewrite the docker compose files to give access to your one central postgres instance? And are there usually any problems with that like version incompatibilities, etc.?

  • MrMcGasion@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    6
    ·
    9 months ago

    That’s a big reason I actively avoid docker on my servers, I don’t like running a dozen instances of my database software, and considering how much work it would take to go through and configure each docker container to use an external database, to me it’s just as easy to learn to configure each piece of software for yourself and know what’s going on under the hood, rather than relying on a bunch of defaults made by whoever made the docker image.

    I hope a good amount of my issues with docker have been solved since I last seriously tried to use docker (which was back when they were literally giving away free tee shirts to get people to try it). But the times I’ve peeked at it since, to me it seems that docker gets in the way more often than it solves problems.

    I don’t mean to yuck other people’s yum though, so if you like docker, and it works for you, don’t let me stop you from enjoying it. I just can’t justify the overhead for myself (both at the system resource level, and personal time level of inserting an additional layer of configuration between me and my software).

    • LifeBandit666@feddit.uk
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 months ago

      I agree to a certain extent and I’m actively using Docker.

      What I’ve done is made an Ubuntu VM, put Docker on it and booted a Portainer client container on it, then made that into a container template, so I can just give it an IP address and boot it up, then add it to Portainer in 3 clicks.

      It’s great for just having a go on something and seeing if I wanna pursue it.

      But so far I’ve tried to boot and run Arr and Plex, and more recently Logitech Media Server and it’s just been hard work.

      I’ve found I’m making more VMs than I thought I would and just putting things together in them, rather than trying to run stacks of Docker together.

      That said, it looks like it is awesome when you know what you’re doing.

    • summerof69@lemm.ee
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 months ago

      What overhead are you talking about? You don’t need a dozen of instances of a database. You can create one, with or without docker, and configure any service to use it. The idea of docker and docker compose is that you can easily start up the whole env. But you don’t have to.

    • sardaukar@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 months ago

      It’s kinda weird to see the Docker scepticism around here. I run 40ish services on my server, all with a single docker-compose YAML file. It just works.

      Comparing it to manually tweaking every project I run seems impossibly time-draining in comparison. I don’t care about the underlying mechanics, just want shit to work.

      • skittlebrau@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        9 months ago

        I care about the underlying tech in the things I deploy, but the reality is that I lack the time to actively do this in practice.

        Ideally I would set everything up manually, but it’s just too hard to keep up with 30+ projects and remembering how/why I set everything up, even with documentation. Docker Compose makes my homelab hobby more manageable.

      • Moonrise2473@feddit.it
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 months ago

        I have everything in docker too, but a single yml with 40 services is a bit extreme - you would be forced to upgrade everything together, no?

        • sardaukar@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 months ago

          Not really. The docker-compose file has services in it, and they’re separate from eachother. If I want to update sonarr but not jellyfin (or its DB service) I can.

      • MrMcGasion@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 months ago

        I think that my skepticism and desire to have docker get out of my way, has more to do with already knowing the underlying mechanics, being used to managing services before docker was a thing, and then docker coming along and saying “just learn docker instead.” Which is fine, if it didn’t mean not only an entire shift from what I already know, but a separation from it, with extra networking and docker configuration to fuss with. If I wasn’t already used to managing servers pre-docker, then yeah, I totally get it.

        • sardaukar@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 months ago

          I used to be a sysadmin in 2002/3 and let me tell you - Docker makes all that menial, boring work go away and services just work. Which is want I want, instead of messing with php.ini extensions or iptables custom rules.

          • MrMcGasion@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            9 months ago

            Maybe I’ll try and give it another go soon to see if things have improved for what I need since I last tried. I do have a couple aging servers that will probably need upgraded soon anyway, and I’m sure my python scripts that I’ve used in the past to help automate server migration will need updated anyway since I last used them.