[PR #24976] feat: add development environment setup commands to Makefile #30871

Closed
opened 2026-02-21 20:48:23 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/24976

State: closed
Merged: Yes


Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Fixes #24974

This PR adds convenient Makefile targets to automate the development environment setup process. The new commands streamline the initialization of Docker middleware services, web dependencies, and API configuration, significantly reducing setup friction for developers.

Key Features Added:

  • make dev-setup: One-command complete backend development environment setup
  • make prepare-docker: Initialize Docker middleware services (PostgreSQL, Redis, Sandbox, Plugin Daemon, SSRF Proxy)
  • make prepare-web: Install web dependencies and build the frontend
  • make prepare-api: Install API dependencies and run database migrations
  • make dev-clean: Properly stop services and clean up data volumes (preserving sandbox volumes)
  • make help: Display all available commands with descriptions

The implementation:

  • Copies environment files from their respective .example templates
  • Uses the correct docker-compose.middleware.yaml configuration
  • Properly names the Docker project as dify-middlewares-dev
  • Preserves sandbox volumes during cleanup as they contain important dependencies

Screenshots

Before After
Manual execution of multiple commands required Single make dev-setup command
No standardized cleanup process make dev-clean removes only necessary volumes
No documentation of available commands make help provides clear guidance

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/24976 **State:** closed **Merged:** Yes --- > [!IMPORTANT] > > 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) > 1. Ensure there is an associated issue and you have been assigned to it > 1. Use the correct syntax to link this PR: `Fixes #<issue number>`. ## Summary Fixes #24974 This PR adds convenient Makefile targets to automate the development environment setup process. The new commands streamline the initialization of Docker middleware services, web dependencies, and API configuration, significantly reducing setup friction for developers. ### Key Features Added: - **`make dev-setup`**: One-command complete backend development environment setup - **`make prepare-docker`**: Initialize Docker middleware services (PostgreSQL, Redis, Sandbox, Plugin Daemon, SSRF Proxy) - **`make prepare-web`**: Install web dependencies and build the frontend - **`make prepare-api`**: Install API dependencies and run database migrations - **`make dev-clean`**: Properly stop services and clean up data volumes (preserving sandbox volumes) - **`make help`**: Display all available commands with descriptions The implementation: - Copies environment files from their respective `.example` templates - Uses the correct `docker-compose.middleware.yaml` configuration - Properly names the Docker project as `dify-middlewares-dev` - Preserves sandbox volumes during cleanup as they contain important dependencies ## Screenshots | Before | After | |--------|-------| | Manual execution of multiple commands required | Single `make dev-setup` command | | No standardized cleanup process | `make dev-clean` removes only necessary volumes | | No documentation of available commands | `make help` provides clear guidance | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:48:23 -05:00
yindo closed this issue 2026-02-21 20:48:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30871