Docker Compose DB Problem

Hello

thanks for joining the forum.

I am struggling with the installation of HedgeDoc. It seems that the database is not accepted.

I use the Docker-Compose script from the official documentation. As it runs in the home network, I left the passwords at default. However, the port was occupied in my case.

services:
  database:
    image: postgres:13.4-alpine
    environment:
      - POSTGRES_USER=hedgedoc
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=hedgedoc
    volumes:
      - ./database:/var/lib/postgresql/data
    restart: always
  app:
    # Make sure to use the latest release from https://hedgedoc.org/latest-release
    image: quay.io/hedgedoc/hedgedoc:1.10.3
    environment:
      - CMD_DB_URL=postgres://hedgedoc:password@database:5432/hedgedoc
      - CMD_DOMAIN=192.168.2.47
      - CMD_URL_ADDPORT=true
    volumes:
      - ./uploads:/hedgedoc/public/uploads
    ports:
      - "3110:3000"
    restart: always
    depends_on:
      - database
volumes:
  database:
  uploads:

This is what the GUI looks like

Logs hedgedoc app

2025-06-27T17:41:15.389Z info: 	192.168.2.88 - - [27/Jun/2025:17:41:15 +0000] "GET / HTTP/1.1" 200 - "http://192.168.2.47:5001/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15"
2025-06-27T17:41:26.729Z info: 	127.0.0.1 - - [27/Jun/2025:17:41:26 +0000] "GET /_health HTTP/1.1" 200 14 "-" "hedgedoc-container-healthcheck/1.1"
2025-06-27T17:41:41.859Z info: 	127.0.0.1 - - [27/Jun/2025:17:41:41 +0000] "GET /_health HTTP/1.1" 200 14 "-" "hedgedoc-container-healthcheck/1.1"
2025-06-27T17:41:56.990Z info: 	127.0.0.1 - - [27/Jun/2025:17:41:56 +0000] "GET /_health HTTP/1.1" 200 14 "-" "hedgedoc-container-healthcheck/1.1"
2025-06-27T17:42:12.115Z info: 	127.0.0.1 - - [27/Jun/2025:17:42:12 +0000] "GET /_health HTTP/1.1" 200 14 "-" "hedgedoc-container-healthcheck/1.1"
2025-06-27T17:42:27.266Z info: 	127.0.0.1 - - [27/Jun/2025:17:42:27 +0000] "GET /_health HTTP/1.1" 200 14 "-" "hedgedoc-container-healthcheck/1.1"
2025-06-27T17:42:42.390Z info: 	127.0.0.1 - - [27/Jun/2025:17:42:42 +0000] "GET /_health HTTP/1.1" 200 14 "-" "hedgedoc-container-healthcheck/1.1"

Logs Database

PostgreSQL init process complete; ready for start up.
2025-06-27 17:39:26.847 UTC [1] LOG:  starting PostgreSQL 13.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
2025-06-27 17:39:26.847 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2025-06-27 17:39:26.847 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2025-06-27 17:39:26.849 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-06-27 17:39:26.852 UTC [51] LOG:  database system was shut down at 2025-06-27 17:39:26 UTC
2025-06-27 17:39:26.855 UTC [1] LOG:  database system is ready to accept connections

Logs from Dockge

hedgedoc-app-1       | 
hedgedoc-database-1  | --auth-local and --auth-host, the next time you run initdb.
hedgedoc-database-1  | Success. You can now start the database server using:
hedgedoc-database-1  | 
hedgedoc-database-1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
hedgedoc-database-1  | 
hedgedoc-database-1  | waiting for server to start....2025-06-27 17:39:26.577 UTC [37] LOG:  starting PostgreSQL 13.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
hedgedoc-database-1  | 2025-06-27 17:39:26.578 UTC [37] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
hedgedoc-database-1  | 2025-06-27 17:39:26.582 UTC [38] LOG:  database system was shut down at 2025-06-27 17:39:26 UTC
hedgedoc-database-1  | 2025-06-27 17:39:26.585 UTC [37] LOG:  database system is ready to accept connections
hedgedoc-database-1  |  done
hedgedoc-database-1  | server started
hedgedoc-database-1  | CREATE DATABASE
hedgedoc-database-1  | 
hedgedoc-database-1  | 
hedgedoc-database-1  | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
hedgedoc-database-1  | 
hedgedoc-database-1  | 2025-06-27 17:39:26.733 UTC [37] LOG:  received fast shutdown request
hedgedoc-database-1  | waiting for server to shut down....2025-06-27 17:39:26.734 UTC [37] LOG:  aborting any active transactions
hedgedoc-database-1  | 2025-06-27 17:39:26.735 UTC [37] LOG:  background worker "logical replication launcher" (PID 44) exited with exit code 1
hedgedoc-database-1  | 2025-06-27 17:39:26.736 UTC [39] LOG:  shutting down
hedgedoc-database-1  | 2025-06-27 17:39:26.744 UTC [37] LOG:  database system is shut down
hedgedoc-database-1  |  done
hedgedoc-database-1  | server stopped
hedgedoc-database-1  | 
hedgedoc-database-1  | PostgreSQL init process complete; ready for start up.
hedgedoc-database-1  | 
hedgedoc-database-1  | 2025-06-27 17:39:26.847 UTC [1] LOG:  starting PostgreSQL 13.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
hedgedoc-database-1  | 2025-06-27 17:39:26.847 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
hedgedoc-database-1  | 2025-06-27 17:39:26.847 UTC [1] LOG:  listening on IPv6 address "::", port 5432
hedgedoc-database-1  | 2025-06-27 17:39:26.849 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
hedgedoc-database-1  | 2025-06-27 17:39:26.852 UTC [51] LOG:  database system was shut down at 2025-06-27 17:39:26 UTC
hedgedoc-database-1  | 2025-06-27 17:39:26.855 UTC [1] LOG:  database system is ready to accept connections
hedgedoc-app-1       | 2025-06-27T17:45:44.210Z info:        127.0.0.1 - - [27/Jun/2025:17:45:44 +0000] "GET /_health HTTP/1.1" 200 14 "-" "hedgedoc-container-healthcheck/1.1"
hedgedoc-app-1       | 
hedgedoc-app-1       | 2025-06-27T17:45:59.335Z info:        127.0.0.1 - - [27/Jun/2025:17:45:59 +0000] "GET /_health HTTP/1.1" 200 14 "-" "hedgedoc-container-healthcheck/1.1"
hedgedoc-app-1       | 

Does anyone have any idea where the fault lies?

Thank you for your support.