[PR #3902] feat: add start commands to devcontainer #24325

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

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

State: closed
Merged: Yes


Description

I work with the dify repo every week and every time I forget the whole command to start the api or the worker. I added these commands because they are intuitive and easy to remember.

This change just introduces shortcut commands to run services, which are made available via alias in the devcontainer:

  • start-api: starts the flask app in debug mode
  • start-worker: starts the worker
  • start-web: starts the nextjs web app in dev mode
  • start-containers: runs docker compose for the middleware compose file to start containers like dbs and sandbox

Type of Change

  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement

How Has This Been Tested?

  • Open the dify workspace in a devcontainer
  • Run the VS Code script "Rebuild Container"
  • Watch the logs, after the container is created, it should run an npm install for web (as it did before)
  • After the container has been created, it should run pip install for api (as it did before)
  • run start-containers (just type it in the terminal and press enter)
    • this should run docker compose to run required containers for local development
  • run start-api
    • this should start the dify api
  • run start-worker
    • this should start the the dify worker
  • run start-web
    • this should start the dify web
  • open ~/.bashrc you should see 4 commands defined at the end of the file
  • close vs code and reopen it
  • the devcontainer should run pip install but should not create the aliases again
  • open ~/.bashrc again
  • it should still contain only the 4 commands once

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes
**Original Pull Request:** https://github.com/langgenius/dify/pull/3902 **State:** closed **Merged:** Yes --- # Description I work with the dify repo every week and every time I forget the whole command to start the api or the worker. I added these commands because they are intuitive and easy to remember. This change just introduces shortcut commands to run services, which are made available via alias in the devcontainer: - start-api: starts the flask app in debug mode - start-worker: starts the worker - start-web: starts the nextjs web app in dev mode - start-containers: runs docker compose for the middleware compose file to start containers like dbs and sandbox ## Type of Change - [x] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement # How Has This Been Tested? - [ ] Open the dify workspace in a devcontainer - [ ] Run the VS Code script "Rebuild Container" - [ ] Watch the logs, after the container is created, it should run an npm install for web (as it did before) - [ ] After the container has been created, it should run pip install for api (as it did before) - [ ] run start-containers (just type it in the terminal and press enter) - [ ] this should run docker compose to run required containers for local development - [ ] run start-api - [ ] this should start the dify api - [ ] run start-worker - [ ] this should start the the dify worker - [ ] run start-web - [ ] this should start the dify web - [ ] open `~/.bashrc` you should see 4 commands defined at the end of the file - [ ] close vs code and reopen it - [ ] the devcontainer should run pip install but should not create the aliases again - [ ] open `~/.bashrc` again - [ ] it should still contain only the 4 commands once # Suggested Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] My changes generate no new warnings - [ ] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods - [ ] `optional` I have made corresponding changes to the documentation - [ ] `optional` I have added tests that prove my fix is effective or that my feature works - [ ] `optional` New and existing unit tests pass locally with my changes
yindo added the pull-request label 2026-02-21 20:22:47 -05:00
yindo closed this issue 2026-02-21 20:22:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#24325