11# Coding WebIDE
22
3+ README: [ English] ( https://github.com/Coding/WebIDE/blob/master/README.md ) | [ 中文] ( https://github.com/Coding/WebIDE/blob/master/README-zh.md )
4+
35![ ] ( https://raw.githubusercontent.com/Coding/WebIDE/gh-pages/screenshots/import.png )
46
57![ ] ( https://raw.githubusercontent.com/Coding/WebIDE/gh-pages/screenshots/workspace.png )
@@ -10,6 +12,7 @@ Coding WebIDE(https://ide.coding.net) is a cloud-based IDE developed by Coding T
1012
1113Please submit issues to corresponding projects, that'll help us make issues tracking easier so that we can provide timely help to you. Submit frontend issues at [ WebIDE-Frontend] ( https://github.com/Coding/WebIDE-Frontend/issues ) and backend issues at [ WebIDE-Backend] ( https://github.com/Coding/WebIDE-Backend/issues ) .
1214
15+
1316## Features
1417
15181 . * Built-In Terminal*
@@ -20,45 +23,89 @@ Please submit issues to corresponding projects, that'll help us make issues trac
20236 . * VIM/Emacs Mode*
21247 . * Previews*
2225
23- [ 中文 README] ( https://github.com/Coding/WebIDE-Workspace/blob/master/README-zh.md )
24-
2526This is the entry point to setup and run the WebIDE Community Edition project. It includes other 3 repos as git submodules.
2627
2728
29+ ## Modules
30+
31+ * [ WebIDE-Frontend] ( https://github.com/Coding/WebIDE-Frontend ) contains frontend code.
32+ * [ WebIDE-Frontend-Webjars] ( https://github.com/Coding/WebIDE-Frontend-Webjars ) packs frontend to webjar.
33+ * [ WebIDE-Backend] ( https://github.com/Coding/WebIDE-Backend ) contains backend code.
2834
2935
30- ## Modules
36+ ## Environment
37+
38+ WebIDE Frontend uses ** npm** for package management, ** webpack** and ** babel** for building.
39+ Frontend Webjars & WebIDE Backend use ** maven3** and ** java8** .
40+
41+ Please ensure you have corresponding tools installed in your environment before build and run the project.
3142
32- > [ WebIDE-Frontend] ( https://github.com/Coding/WebIDE-Frontend ) contains frontend code.
33- > [ WebIDE-Frontend-Webjars] ( https://github.com/Coding/WebIDE-Frontend-Webjars ) packs frontend to webjar.
34- > [ WebIDE-Backend] ( https://github.com/Coding/WebIDE-Backend ) contains backend code.
3543
44+ ## Build and run
3645
37- ## How to clone
46+ ### Clone the repo
3847
39- Clone this git repo to local. Then do:
48+ Clone from coding.net:
49+ ```
50+ git clone [email protected] :coding/WebIDE.git 51+ ```
52+ Clone from github.com:
53+ ```
54+ git clone [email protected] :Coding/WebIDE.git 55+ ```
4056
57+ Init and pull submodules:
4158```
4259git submodule init
4360git submodule update
4461```
45-
4662This will also clone the other 3 repos via git submodule mechanism.
4763
4864
49- ## Environment
65+ ### Run on a normal host
5066
51- WebIDE Frontend uses ` npm ` for package management, ` webpack ` and ` babel ` for building.
52- WebIDE Frontend Webjars & WebIDE Backend use ` maven ` .
67+ We provide a shell script ` ide.sh ` to ease the process for you.
5368
54- Please ensure you have corresponding tools installed in your environment before build and run the project.
69+ ```
70+ ./ide.sh build # transpile and pack the frontend to webjars
71+ ./ide.sh run # start the backend server
72+ ```
73+ Server runs on port 8080 by default, visit localhost:8080 to check it out.
5574
5675
57- ## Build and run
76+ ### Run in a docker container
77+
78+ #### Using ` ide.sh `
79+
80+ ```
81+ ./ide.sh docker build # create docker image
82+ ./ide.sh docker run # create and start a container
83+ ./ide.sh docker stop # stop container
84+ ./ide.sh docker attach # attach container
85+ ./ide.sh docker logs # check container's logs
86+ ./ide.sh docker exec # create a new Bash session in the container
87+ ```
88+
89+ #### Using ` docker ` CLI
90+
91+ If you encounter any problem using ` ide.sh ` , try get around it using docker CLI directly.
92+
93+ ```
94+ # create docker image
95+ docker build -t coding/webide
96+
97+ # create and start a container
98+ docker run -p 8080:8080 -v $HOME/.m2:/home/coding/.m2 -v $HOME/.coding-ide-home:/home/coding/.coding-ide-home --name webide coding/webide
5899
59- We provide a shell script ` ide.sh ` to ease the build and run process
100+ # stop container
101+ docker stop webide
60102
61- > ** ./ide.sh build: ** builds the frontend and packs to webjars
62- > ** ./ide.sh run: ** start the backend and server
103+ # attach container
104+ docker attach webide
63105
64- Server runs on port 8080 by default, visit localhost:8080 to check it out. Have fun!
106+ # check container's logs
107+ docker logs webide
108+
109+ # create a new Bash session in the container
110+ docker exec -it webide bash
111+ ```
0 commit comments