Sign inSign up

himanshu806/dbquery-backend

By himanshu806

•Updated 6 months ago

DBQuery is an AI-powered database agent that translates natural language into safe, optimized SQL.

Image
Developer tools
Monitoring & observability
0

2.2K

himanshu806/dbquery-backend repository overview

⁠DBQuery Backend: Docker Deployment Guide

DBQuery is an AI-powered database agent that translates natural language into safe, optimized SQL. This guide helps you deploy the backend using Docker.

⁠🚀 Quick Start

⁠1. Prerequisites
⁠2. Download Configuration Files

Download the following files into a new directory:

  • docker-compose.yml
  • .env.example (Rename this to .env)
⁠3. Configure Environment

Open your .env file and set the following:

  • DATABASE_URL: Location of the SQLite file (default: file:./prisma/data/local_db.sqlite).
  • APP_USER & APP_PASSWORD: Initial admin credentials for the dashboard.
  • ENCRYPTION_KEY: A random 32-character hex string for securing sensitive data.
⁠4. Launch the Backend

Run the following command in your terminal:

docker-compose up -d

The backend API will be available at http://localhost:8000.

⁠🖥️ Connecting the Frontend

Once the backend is running, you can use the DBQuery desktop app or web dashboard to connect.

  1. Log in with your APP_USER and APP_PASSWORD.
  2. Navigate to Settings -> Add Configuration.
  3. Enter your PostgreSQL connection string and AI provider details (OpenAI/Ollama).

⁠🗄️ Persistence

The docker-compose.yml mounts a local ./data folder to /app/prisma/data inside the container. This ensures your chat history and configuration remain persistent across restarts.

⁠🛠️ Troubleshooting

  • Database Connection: Ensure the PostgreSQL instance is accessible from the Docker container. Use host.docker.internal for local DBs or the actual IP/hostname.
  • AI Providers: For Ollama, the default host is usually http://host.docker.internal:11434.

Built with ❤️ by Himanshu⁠

Tag summary

Content type

Image

Digest

sha256:aac064cad…

Size

300 MB

Last updated

6 months ago

docker pull himanshu806/dbquery-backend