Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Welcome to the new `docker` directory for deploying Dify using Docker Compose. T
- Ensure the `middleware.env` file is created by running `cp middleware.env.example middleware.env` (refer to the `middleware.env.example` file).
1. **Running Middleware Services**:
- Navigate to the `docker` directory.
- Execute `docker compose -f docker-compose.middleware.yaml --profile weaviate -p dify up -d` to start the middleware services. (Change the profile to other vector database if you are not using weaviate)
- Execute `docker compose --env-file middleware.env -f docker-compose.middleware.yaml -p dify up -d` to start PostgreSQL/MySQL (per `DB_TYPE`) plus the bundled Weaviate instance.
> Compose automatically loads `COMPOSE_PROFILES=${DB_TYPE},weaviate` from `middleware.env`, so no extra `--profile` flags are needed. Adjust those variables if you want a different combo.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve clarity and prevent potential confusion for users, it would be best to make the explanation of the COMPOSE_PROFILES variable in this note consistent with its definition in the middleware.env.example file. The current note omits the default value for DB_TYPE.

Suggested change
> Compose automatically loads `COMPOSE_PROFILES=${DB_TYPE},weaviate` from `middleware.env`, so no extra `--profile` flags are needed. Adjust those variables if you want a different combo.
> Compose automatically loads `COMPOSE_PROFILES=${DB_TYPE:-postgresql},weaviate` from `middleware.env`, so no extra `--profile` flags are needed. Adjust variables in `middleware.env` if you want a different combination of services.


### Migration for Existing Users

Expand Down
7 changes: 7 additions & 0 deletions docker/middleware.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED=true
[email protected]
WEAVIATE_HOST_VOLUME=./volumes/weaviate

# ------------------------------
# Docker Compose profile configuration
# ------------------------------
# Loaded automatically when running `docker compose --env-file middleware.env ...`.
# Controls which DB/vector services start, so no extra `--profile` flag is needed.
COMPOSE_PROFILES=${DB_TYPE:-postgresql},weaviate

# ------------------------------
# Docker Compose Service Expose Host Port Configurations
# ------------------------------
Expand Down