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.
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.
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.
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.