From 609f6c3decc65691f00bd485dd464701a49ddcde Mon Sep 17 00:00:00 2001 From: boojack Date: Wed, 19 Apr 2023 10:45:11 +0800 Subject: [PATCH] docs: update readme (#37) * docs: update readme with `deploy with docker` * chore: add common questions section --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 99b0856..807421e 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,17 @@ SQL Chat is built by Next.js, it supports the following databases and will add m - Only the database schema will be sent to the OpenAI API. No table data will be sent there. +## Deploy with Docker + +```bash +docker run -d --name sqlchat -p 3000:3000 sqlchat/sqlchat:latest +``` + +You can set the following environment variables to customize the deployment: + +- `OPENAI_API_KEY`: OpenAI API key. You can get one from [here](https://beta.openai.com/docs/developer-quickstart/api-keys). +- `OPENAI_API_ENDPOINT`: OpenAI API endpoint. Defaults to `https://api.openai.com`. + ## Local Development 1. Make a copy of the example environment variables file; @@ -51,6 +62,32 @@ SQL Chat is built by Next.js, it supports the following databases and will add m pnpm i && pnpm dev ``` +## Common questions + +
How to self host SQL Chat? +

+ +- You can deploy SQL Chat to Vercel with one click + + vercel + +- You can deploy your SQL Chat with docker in seconds + + ```bash + docker run -d --name sqlchat -p 3000:3000 sqlchat/sqlchat:latest + ``` + +

+
+ +
It always says that I have a network connection issue? +

+ +Please make sure you have a stable network connection which can access the OpenAI API endpoint. If you cannot access the OpenAI API endpoint, you can try to set the `OPENAI_API_ENDPOINT` in UI or environment variable. + +

+
+ ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=sqlchat/sqlchat&type=Date)](https://star-history.com/#sqlchat/sqlchat&Date)