After running docker-compose up -d, my Docker logs produce this error:

ERROR r2d2: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

I’ve checked docker-compose.yml, lemmy.hjson, /etc/nginx/sites-enabled/lemmy.conf and don’t see anything unusual. Any ideas how to troubleshoot this?

  • nutomicA
    link
    fedilink
    arrow-up
    2
    ·
    3 years ago

    localhost sounds wrong, it should use postgres as hostname (which is the docker container where the database is running).