WrenAI icon indicating copy to clipboard operation
WrenAI copied to clipboard

Problem with Postgres connection running with docker in the same host of WrenAI

Open BeraBravo opened this issue 11 months ago • 1 comments

Describe the bug I'm not able to use my Postgres database host reference running on

127.0.0.1

I'm running the docker container WrenAI in the same host

To Reproduce

I'm receiving this error

Host 127.0.0.1 Invalid host. Use 'host.docker.internal' on macOS/Windows to connect to the local database.

Expected behavior To connect with docker running on host 127.0.0.1

Desktop (please complete the following information):

  • OS: Linux ubuntu 24
  • Browser Chrome

Wren AI Information

  • Version: latest

BeraBravo avatar Jan 26 '25 14:01 BeraBravo

@BeraBravo

Hi! Would u like to try this method?

This was shared by our community member: the solution was to run the docker network connect wrenai_wren mydb-container command which connected wrenAI container with my db container. then I could point wrenAI app to my postgres container name (as hostname) and port 5432

cyyeh avatar Jan 26 '25 15:01 cyyeh