I’ve a QNAP NAS and don’t like having muliple docker containers for the same App. If Apps have multiple containers I wrap them in a LXD container.

When I do that with Lemmy It fails all the time with password issues on the DB. Even when I know the passwords are right. I’ve had the same issues with Docker but it does start eventually.

  • Lionel C-R@lemmy.coupou.fr
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 years ago

    Maybe because of the startup time of your dB? Try to delay the start of the app or make sure your dB is ready to accept connections before launching it.

    Also did you try a manual connection to the dB using the creds used by the app? Just to be sure, thinking you know and having verified that you know are two different things.

    On a side note, having multiple containers for the same apps is the way microservices are supposed to work.

    • DaveP@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      Thank you for the reply. I understand that having multiple containers is normal especially in docker. I just like my systems to be tidy.

      I don’t know how to delay the start of the app in docker compose and I did look. All it did was hang the system.

      I have also tried connecting to the db on its own that works fine.

      But I’ve actually discovered that when I get the containers up and running by starting each manually, which means it won’t survive a restart, I can’t get the app to start. I get a 502. Which seems to cover a multitude of sins.

      • Lionel C-R@lemmy.coupou.fr
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        I’m not sure I follow, you have the app running in docker, in a lxc container? In which case you might have some issues with e.g volume mounts unless the lxc is running in some privileged mode.

        I would have rather used a VM to isolate a docker app.

        • DaveP@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 years ago

          I have several LXDs running docker containers without any issues. They are set up similar to a VM and work in pretty much the same way. Just install docker inside it. I did try and set up the first ones in a VM and it was exactly the same as installing on LXD except the LXD images were easier to manage and always ended up much smaller in size. Once created LXD, VM and Metal are treated the same for an install. All on their own IP and called in exactly the same way https://<HOST IP>

          I did try it in a VM just in case and Lemmy doesn’t start when I do that either. As I don’t have access to other systems I asked a friend to try installing it and he could get it going just using the docker-compose script never mind in LXD.

          Is there a straight install awaiting that doesn’t use ansible so I can try that.