Add Dify quickstart (#10903)

* add quick start

* modify

* modify

* add

* add

* resize

* add mp4

* add vedio

* add video

* video

* add

* modify

* add

* modify
This commit is contained in:
Zhicun 2024-05-06 10:01:34 +08:00 committed by GitHub
parent 0edef1f94c
commit 8379f02a74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,11 +17,36 @@ openssl rand -base64 42
sed -i 's/SECRET_KEY=.*/SECRET_KEY=<your_value>/' .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.