WrenAI
WrenAI copied to clipboard
Question: With Containers, how do I specify the Postgres Host (other than localhost)?
Describe the bug When Deploying the docker-compose, I want to use my external Postgres DB. I do not see how can I do that with config files.
To Reproduce
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu 22.04
WrenAI Information
- WREN_PRODUCT_VERSION: 0.3.4
Additional context Currently, the app is trying to reach 127.0.0.1:5432
Background tracker started Error: connect ECONNREFUSED 127.0.0.1:5432 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 5432 }
Also, I want to know if the bootstrap init script is intended to be used with UI only, the engine, or both. I'm considering deploying this on my k8s, and for scalability reasons, you should consider making UI and the engine independent and not rely on the common files.
Hi @qdrddr,
Thanks for reaching out.
Our current architecture aims to quickly bootstrap in a user's local environment. As such, you’ll notice that:
- We use SQLite over PostgreSQL by default due to its portability.
- We use a shared Docker volume. Using multiple volumes would complicate upgrades and maintenance.
- In order to let users start the service easily, we use a bootstrap script to create some default configuration files required for the engine. This script initializes files specifically for the engine.
The good news is that we’re working on enhancing our architecture to the next level. We plan to make all our components (UI, Engine, AI Service) stateless and able to scale horizontally. I believe this will better suit a Kubernetes architecture.
Stay tuned for our future release. 😎 We'll also fix some issues you may have encountered when using PostgreSQL as the application database recently.
figured this out: PG_URL
https://github.com/Canner/WrenAI/blob/main/deployment/kustomizations/examples/secret-wren_example.yaml#L22