Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions en/self-host/advanced-deployments/local-source-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ A series of middlewares for storage (e.g. PostgreSQL / Redis / Weaviate (if not
```Bash
cd docker
cp middleware.env.example middleware.env
docker compose -f docker-compose.middleware.yaml up -d
# change the profile to mysql if you are not using postgres
Comment thread
crazywoola marked this conversation as resolved.
Outdated
# change the profile to other vector database if you are not using weaviate
docker compose -f docker-compose.middleware.yaml --profile postgresql --profile weaviate -p dify up -d
Comment thread
RiskeyL marked this conversation as resolved.
```

---
Expand Down Expand Up @@ -75,7 +77,7 @@ The backend services include
[uv](https://docs.astral.sh/uv/getting-started/installation/) is used to manage dependencies.
Install the required dependencies with `uv` by running:
```
uv sync
uv sync --dev
```
> For macOS: install libmagic with `brew install libmagic`.

Expand Down Expand Up @@ -111,14 +113,14 @@ To consume asynchronous tasks from the queue, such as dataset file import and da

- for macOS or Linux
```
uv run celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail,ops_trace
uv run celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,priority_dataset,priority_pipeline,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow,schedule_poller,schedule_executor,triggered_workflow_dispatcher,trigger_refresh_executor
```

If you are using a Windows system to start the Worker service, please use the following command instead:

- for Windows
```
uv run celery -A app.celery worker -P solo --without-gossip --without-mingle -Q dataset,generation,mail,ops_trace --loglevel INFO
uv run celery -A app.celery worker -P solo --without-gossip --without-mingle --loglevel INFO -Q dataset,priority_dataset,priority_pipeline,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow,schedule_poller,schedule_executor,triggered_workflow_dispatcher,trigger_refresh_executor
```

Expected output:
Expand Down Expand Up @@ -189,6 +191,14 @@ To consume asynchronous tasks from the queue, such as dataset file import and da
2025-04-28 17:07:15,742 INFO [pidbox.py:111] pidbox: Connected to redis://:**@localhost:6379/1.
```

### Start the Beat service

Additionally, if you want to debug the celery scheduled tasks or run the Schedule Trigger node, you can run the following command in another terminal to start the beat service:

```bash
uv run celery -A app.celery beat
```

---

## Setup Web Service
Expand Down