Connect to a database in a container withou specific IP address?

I want to connect with DBeaver (or any other database tool) to a database in a container, in my exmaple the PostgreSQL db of teable ( dennys-umbrel-app-store/denny-teable at master · dennysubke/dennys-umbrel-app-store · GitHub ).

This is possible with:

  • create the SSH connection to Umbrel
  • conect to the database in the container with the IP Address of the container

It works with the IP Address in the connection settings → OK
When I enter the hostname, the connect doesn’t work.

Problem:
After a restart of UmbrelOS the IP Address is not same as before.

Is there a solution for this issue?

First question … Are you trying to connect: Container-to-Container or your browser to the database?

The name in the docker-composer.yml file is the Hostname.

I am trying to connect from a linux client to UmbrelOS via a SSH connection and then to the container

The hostname of the database container is not in the docker-compose.yml. I guess the database has it’s own container.

When I enter the APP_HOST as hostname in the connection settings the connect doesn’t work.