You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637
  1. # Devlopment with devcontainer
  2. This project includes a devcontainer configuration that allows you to open the project in a container with a fully configured development environment.
  3. Both frontend and backend environments are initialized when the container is started.
  4. ## GitHub Codespaces
  5. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/langgenius/dify)
  6. you can simply click the button above to open this project in GitHub Codespaces.
  7. For more info, check out the [GitHub documentation](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace#creating-a-codespace).
  8. ## VS Code Dev Containers
  9. [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/langgenius/dify)
  10. if you have VS Code installed, you can click the button above to open this project in VS Code Dev Containers.
  11. You can learn more in the [Dev Containers documentation](https://code.visualstudio.com/docs/devcontainers/containers).
  12. ## Pros of Devcontainer
  13. Unified Development Environment: By using devcontainers, you can ensure that all developers are developing in the same environment, reducing the occurrence of "it works on my machine" type of issues.
  14. Quick Start: New developers can set up their development environment in a few simple steps, without spending a lot of time on environment configuration.
  15. Isolation: Devcontainers isolate your project from your host operating system, reducing the chance of OS updates or other application installations impacting the development environment.
  16. ## Cons of Devcontainer
  17. Learning Curve: For developers unfamiliar with Docker and VS Code, using devcontainers may be somewhat complex.
  18. Performance Impact: While usually minimal, programs running inside a devcontainer may be slightly slower than those running directly on the host.
  19. ## Troubleshooting
  20. if you see such error message when you open this project in codespaces:
  21. ![Alt text](troubleshooting.png)
  22. a simple workaround is change `/signin` endpoint into another one, then login with github account and close the tab, then change it back to `/signin` endpoint. Then all things will be fine.
  23. The reason is `signin` endpoint is not allowed in codespaces, details can be found [here](https://github.com/orgs/community/discussions/5204)