-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added deploy section in readme and doc (#188)
refer: #183
- Loading branch information
Cheese
authored
Jul 25, 2024
1 parent
741e842
commit 2db9710
Showing
8 changed files
with
123 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.idea | ||
.env | ||
.env | ||
|
||
redis-data | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
DEBUG=true | ||
|
||
SECRET_KEY=******************************** | ||
|
||
TIDB_DATABASE=test | ||
TIDB_HOST=gateway01.eu-central-1.prod.aws.tidbcloud.com | ||
TIDB_USER=*****.root | ||
TIDB_HOST='gateway**.**-****-*.prod.aws.tidbcloud.com' | ||
TIDB_USER='*****.root' | ||
TIDB_PASSWORD=******* | ||
|
||
OPENAI_API_KEY=sk-******** | ||
GOOGLE_API_KEY=******* | ||
OPENAI_API_KEY=sk-******************************** | ||
# Optional | ||
GOOGLE_API_KEY=******************************** | ||
|
||
LANGFUSE_SECRET_KEY=sk-***** | ||
LANGFUSE_PUBLIC_KEY=pk-lf-***** | ||
LANGFUSE_SECRET_KEY=sk-lf-******************************** | ||
LANGFUSE_PUBLIC_KEY=pk-lf-******************************** | ||
LANGFUSE_HOST=https://us.cloud.langfuse.com | ||
|
||
CELERY_BROKER_URL=redis://127.0.0.1:6379/0 | ||
CELERY_RESULT_BACKEND=redis://127.0.0.1:6379/0 | ||
CELERY_BROKER_URL=redis://redis:6379/0 | ||
CELERY_RESULT_BACKEND=redis://redis:6379/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Quick Start | ||
|
||
This document provides instructions for deploying the entire RAG using Docker Compose. | ||
|
||
## Prerequisites | ||
|
||
1. Set up a [TiDB Serverless cluster](https://docs.pingcap.com/tidbcloud/tidb-cloud-quickstart). | ||
2. Install [Docker Compose](https://docs.docker.com/compose/install/). | ||
3. Install [Python 3.11](https://www.python.org/downloads/release/python-3110/). | ||
4. Install [Rye](https://rye.astral.sh/guide/installation/). | ||
|
||
## Deployment Steps | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/pingcap/tidb.ai.git | ||
cd tidb.ai | ||
``` | ||
|
||
2. Copy and edit the `.env` file in the `backend` directory: | ||
|
||
```bash | ||
cp ./backend/.env.example ./backend/.env | ||
vim ./backend/.env # or use another text editor to edit this file | ||
``` | ||
|
||
3. Migrate the database schema: | ||
|
||
```bash | ||
cd backend | ||
rye sync | ||
make migrate | ||
cd .. | ||
``` | ||
|
||
4. Start the services using Docker Compose: | ||
|
||
```bash | ||
docker compose up | ||
``` | ||
|
||
That's it! You can now use TiDB.AI locally. You can also go to https://tidb.ai to experience the live demo. |