Jyong 226f28edcb Feature/self host notion import (#397) 1 rok pred
..
constants db896255d6 Initial commit 2 rokov pred
controllers 226f28edcb Feature/self host notion import (#397) 1 rok pred
core 226f28edcb Feature/self host notion import (#397) 1 rok pred
docker db896255d6 Initial commit 2 rokov pred
events db896255d6 Initial commit 2 rokov pred
extensions f8eefa31fe feat: add redis ssl support (#65) 2 rokov pred
libs 226f28edcb Feature/self host notion import (#397) 1 rok pred
migrations 9253f72dea Feat/dataset notion import (#392) 1 rok pred
models 9253f72dea Feat/dataset notion import (#392) 1 rok pred
services 9253f72dea Feat/dataset notion import (#392) 1 rok pred
tasks 9253f72dea Feat/dataset notion import (#392) 1 rok pred
tests db896255d6 Initial commit 2 rokov pred
.dockerignore db896255d6 Initial commit 2 rokov pred
.env.example 9253f72dea Feat/dataset notion import (#392) 1 rok pred
Dockerfile db896255d6 Initial commit 2 rokov pred
README.md e8239ae631 feat: add celery document (#118) 1 rok pred
app.py 9253f72dea Feat/dataset notion import (#392) 1 rok pred
commands.py 6123bba96d feat: add reset-encrypt-key-pair cmd for self hosted mode (#325) 1 rok pred
config.py 226f28edcb Feature/self host notion import (#397) 1 rok pred
requirements.txt f350948bde Fix the issue of decoding a non-UTF-8 encoded file using UTF-8 (#389) 1 rok pred

README.md

Dify Backend API

Usage

  1. Start the docker-compose stack

The backend require some middleware, including PostgreSQL, Redis, and Weaviate, which can be started together using docker-compose.

   cd ../docker
   docker-compose -f docker-compose.middleware.yaml up -d
   cd ../api
  1. Copy .env.example to .env
  2. Generate a SECRET_KEY in the .env file.

    openssl rand -base64 42
    
  3. Install dependencies

    pip install -r requirements.txt
    
  4. Run migrate

Before the first launch, migrate the database to the latest version.

   flask db upgrade
  1. Start backend:

    flask run --host 0.0.0.0 --port=5001 --debug
    
  2. Setup your application by visiting http://localhost:5001/console/api/setup or other apis...

  3. If you need to debug local async processing, you can run celery -A app.celery worker, celery can do dataset importing and other async tasks.