fix: index number in api/README (#3214)

This commit is contained in:
Bowen Liang 2024-04-09 13:59:26 +08:00 committed by GitHub
parent 84d7cbf916
commit 0516b78d6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,16 +17,16 @@
```bash ```bash
sed -i "/^SECRET_KEY=/c\SECRET_KEY=$(openssl rand -base64 42)" .env sed -i "/^SECRET_KEY=/c\SECRET_KEY=$(openssl rand -base64 42)" .env
``` ```
3.5 If you use Anaconda, create a new environment and activate it 4. If you use Anaconda, create a new environment and activate it
```bash ```bash
conda create --name dify python=3.10 conda create --name dify python=3.10
conda activate dify conda activate dify
``` ```
4. Install dependencies 5. Install dependencies
```bash ```bash
pip install -r requirements.txt pip install -r requirements.txt
``` ```
5. Run migrate 6. Run migrate
Before the first launch, migrate the database to the latest version. Before the first launch, migrate the database to the latest version.
@ -47,9 +47,11 @@
pip install -r requirements.txt --upgrade --force-reinstall pip install -r requirements.txt --upgrade --force-reinstall
``` ```
6. Start backend: 7. Start backend:
```bash ```bash
flask run --host 0.0.0.0 --port=5001 --debug flask run --host 0.0.0.0 --port=5001 --debug
``` ```
7. Setup your application by visiting http://localhost:5001/console/api/setup or other apis... 8. Setup your application by visiting http://localhost:5001/console/api/setup or other apis...
8. If you need to debug local async processing, you can run `celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail`, celery can do dataset importing and other async tasks. 9. If you need to debug local async processing, please start the worker service by running
`celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail`.
The started celery app handles the async tasks, e.g. dataset importing and documents indexing.