Skip to content

oceanbase/dify-on-mysql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dify for MySQL

English | 简体中文

This is a fork of https://github.com/langgenius/dify . We made some modifications based on the original Dify project to enable it to use MySQL as the database.

This branch is based on the legacy version https://github.com/oceanbase-devhub/dify and has been maintained since Dify 1.1.0. It will be released regularly before the official community implements MySQL adaptation.

Quick start

Before installing Dify, make sure your machine meets the following minimum system requirements:

  • CPU >= 2 Core
  • RAM >= 4 GiB

The easiest way to start the Dify server is through docker-compose.yaml.

Before running Dify with the following commands, make sure that Docker and Docker Compose are installed on your machine. If you want to use MySQL or OceanBase database to replace Postgresql, please prepare an MySQL or OceanBase database and create a database for Dify to use.

cd docker
bash setup-mysql-env.sh
docker compose up -d

Note:

  • setup-mysql-env.sh is a script for setting database parameters. It will update the parameters for MySQL connection according to the user input and set OceanBase as the Vector Store.
  • In order to facilitate users in mainland China to pull Docker images, we choose to maintain the images of this Dify branch under the organization https://quay.io/organization/oceanbase-devhub, and the several required images in docker-compose.yaml are also changed to this registry.
  • Dify 1.x introduced the plugin system. The plugin installation process will execute commands like pip install -r requirements.txt according to the plugin configuration, in order to speed up the installation process, the script has set PIP_MIRROR_URL to Tsinghua University Tuna Mirror Site.

After running, you can access the Dify dashboard in your browser at http://localhost/install and start the initialization process.

For more information on using Dify, please refer to https://dify.ai.

License

This repository is available under the Dify Open Source License, which is essentially Apache 2.0 with a few additional restrictions.

Languages

  • TypeScript 56.6%
  • Python 30.6%
  • JavaScript 7.4%
  • MDX 4.2%
  • CSS 0.9%
  • Shell 0.1%
  • Other 0.2%