fengmiguoji commited on
Commit
2e69262
·
verified ·
1 Parent(s): 2d69f51

Upload .devcontainer\README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. .devcontainer//README.md +37 -0
.devcontainer//README.md ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Development 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
+
7
+ you can simply click the button above to open this project in GitHub Codespaces.
8
+
9
+ 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).
10
+
11
+
12
+ ## VS Code Dev Containers
13
+ [![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)
14
+
15
+ if you have VS Code installed, you can click the button above to open this project in VS Code Dev Containers.
16
+
17
+ You can learn more in the [Dev Containers documentation](https://code.visualstudio.com/docs/devcontainers/containers).
18
+
19
+
20
+ ## Pros of Devcontainer
21
+ 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.
22
+
23
+ Quick Start: New developers can set up their development environment in a few simple steps, without spending a lot of time on environment configuration.
24
+
25
+ Isolation: Devcontainers isolate your project from your host operating system, reducing the chance of OS updates or other application installations impacting the development environment.
26
+
27
+ ## Cons of Devcontainer
28
+ Learning Curve: For developers unfamiliar with Docker and VS Code, using devcontainers may be somewhat complex.
29
+
30
+ Performance Impact: While usually minimal, programs running inside a devcontainer may be slightly slower than those running directly on the host.
31
+
32
+ ## Troubleshooting
33
+ if you see such error message when you open this project in codespaces:
34
+ ![Alt text](troubleshooting.png)
35
+
36
+ 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.
37
+ The reason is `signin` endpoint is not allowed in codespaces, details can be found [here](https://github.com/orgs/community/discussions/5204)