From 8379f02a74b0e347aa76cbf5eec182a644e18ed9 Mon Sep 17 00:00:00 2001 From: Zhicun <59141989+ivy-lv11@users.noreply.github.com> Date: Mon, 6 May 2024 10:01:34 +0800 Subject: [PATCH] Add Dify quickstart (#10903) * add quick start * modify * modify * add * add * resize * add mp4 * add vedio * add video * video * add * modify * add * modify --- .../doc/LLM/Quickstart/dify_quickstart.md | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/readthedocs/source/doc/LLM/Quickstart/dify_quickstart.md b/docs/readthedocs/source/doc/LLM/Quickstart/dify_quickstart.md index 7d4af4c8..44b209dc 100644 --- a/docs/readthedocs/source/doc/LLM/Quickstart/dify_quickstart.md +++ b/docs/readthedocs/source/doc/LLM/Quickstart/dify_quickstart.md @@ -17,11 +17,36 @@ openssl rand -base64 42 sed -i 's/SECRET_KEY=.*/SECRET_KEY=/' .env pip install -r requirements.txt ``` +> openssl is pre-installed with Ubuntu 22.04. ### Prepare for redis, postgres, node and npm. * Install Redis by `sudo apt-get install redis-server`. Refer to [page](https://www.hostinger.com/tutorials/how-to-install-and-setup-redis-on-ubuntu/) to setup the Redis environment, including password, demon, etc. * install postgres by `sudo apt-get install postgres` and `sudo apt-get install postgres-client`. Setup username, create a database and grant previlidge according to [page](https://www.ruanyifeng.com/blog/2013/12/getting_started_with_postgresql.html) -* install npm and node by `brew install node@20` according to [nodejs page](https://nodejs.org/en/download/package-manager) -> Note that set redis and postgres related environment in .env under dify/api/ and set web related environment variable in .env.local under dify/web +* install npm and node by prebuilt installer, binaries or packet manager according to [nodejs page](https://nodejs.org/en/download/package-manager) +> Note that set redis and postgres related environment in .env under dify/api/ and set web related environment variable in .env.local under dify/web. +> +> Example in dify/api/.env and modify settings in redis and postgres. +> ```bash +> REDIS_HOST=localhost +> REDIS_PORT=6379 +> REDIS_USERNAME= +> REDIS_PASSWORD=xxxx +> REDIS_DB=0 +> DB_USERNAME=xxxx +> DB_PASSWORD=xxxx +> DB_HOST=localhost +> DB_PORT=5432 +> DB_DATABASE=dify +> +>``` +> Example .env.local +> ```bash +> # For production release, change this to PRODUCTION +> NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT +> NEXT_PUBLIC_EDITION=SELF_HOSTED +> NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api +> NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api +> NEXT_PUBLIC_SENTRY_DSN= +> ``` ### Install Ollama Please install ollama refer to [ollama quick start](./ollama_quickstart.md). Ensure that ollama could run successfully on Intel GPU.