Skip to content

Commit 616f32d

Browse files
committed
update readme
1 parent 90b319a commit 616f32d

File tree

2 files changed

+7
-141
lines changed

2 files changed

+7
-141
lines changed

README-zh.md

Lines changed: 4 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ WebIDE-Frontend-Webjars & WebIDE-Backend 项目依赖 **maven3** 和 **java8**
4040

4141
在编译、运行项目前,请保证环境依赖已被正确配置。
4242

43-
44-
## 编译、打包、运行
45-
46-
### 克隆项目
43+
## Server 版
4744

4845
从 Coding 克隆项目:
4946
```
@@ -60,79 +57,17 @@ git clone [email protected]:Coding/WebIDE.git
6057
git submodule init
6158
git submodule update
6259
```
63-
这样就会通过 git 的 submodule 机制 clone 另外 3 个 repo
64-
65-
66-
### 本机版
67-
68-
本项目提供了一个脚本 `ide.sh`,用于编译、打包、运行项目:
60+
这样就会通过 git 的 submodule 机制 clone 另外 3 个 repo。
6961

7062
```
7163
./ide.sh build # 编译并打包前端项目
7264
./ide.sh run # 启动项目
7365
```
74-
启动完成后,默认端口为 8080,访问 localhost:8080 即可。打开浏览器访问 http://localhost:8080
75-
76-
77-
### Docker 版
78-
79-
webide 镜像已上传到 docker hub: [webide](https://hub.docker.com/r/webide/webide/),可以直接从 docker hub 拉取镜像、创建容器并执行:
80-
```
81-
./ide.sh docker run
82-
```
8366

84-
#### 使用 ide.sh
85-
86-
如果对代码进行了修改,想要从源代码编译、运行,可以执行:
87-
```
88-
./ide.sh docker build # 创建 docker 镜像
89-
./ide.sh docker run # 创建并启动 container
90-
```
67+
## docker 版
9168

92-
以下是 `ide.sh` 里包含的 docker 相关命令
93-
```
94-
./ide.sh docker build # 创建 docker 镜像
95-
./ide.sh docker run # 创建并启动 container
96-
./ide.sh docker stop # 停止 container
97-
./ide.sh docker attach # attach container(use control-c to exit)
98-
./ide.sh docker logs # 查看 container log
99-
./ide.sh docker exec # 进入 container
100-
./ide.sh docker remove # 删除 container
101-
```
102-
103-
#### 使用 docker 命令
104-
105-
如果在使用脚本的过程中遇到了困难,可以直接使用 docker 的命令。
106-
107-
##### 直接运行
108-
109-
如果不想保存应用的状态,即删除 container 后,应用的数据也会消失,可以执行:
11069
```
11170
docker run -p 8080:8080 --name webide webide/webide
11271
```
11372

114-
如果想保留这些状态,请确保 `$HOME/.coding-ide-home` 存在,如果不存在,请**手动创建**。然后将目录挂载即可:
115-
```
116-
docker create -p 8080:8080 -v $HOME/.coding-ide-home:/home/coding/.coding-ide-home --name webide webide/webide
117-
```
118-
119-
##### 编译、运行
120-
```
121-
docker build -t webide/webide
122-
docker run -p 8080:8080 --name webide webide/webide
123-
```
124-
125-
以下是常用的 docker 相关命令
126-
```
127-
# 停止 container
128-
docker stop webide
129-
130-
# attach container
131-
docker attach --sig-proxy=false webide
132-
133-
# 查看 container log
134-
docker logs webide
135-
136-
# 进入 container
137-
docker exec -it webide bash
138-
```
73+
更多 docker 命令,参照 wiki [English](https://github.com/Coding/WebIDE/wiki/Docker-Server.en) [中文](https://github.com/Coding/WebIDE/wiki/Docker-Server.zh)

README.md

Lines changed: 3 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ Frontend Webjars & WebIDE Backend use **maven3** and **java8**.
4141
Please ensure you have corresponding tools installed in your environment before build and run the project.
4242

4343

44-
## Build and run
45-
46-
### Clone the repo
44+
## Native Server
4745

4846
Clone from coding.net:
4947
```
@@ -62,77 +60,10 @@ git submodule update
6260
```
6361
This will also clone the other 3 repos via git submodule mechanism.
6462

63+
## Docker Server
6564

66-
### Run on a normal host
67-
68-
We provide a shell script `ide.sh` to ease the process for you.
69-
70-
```
71-
./ide.sh build # transpile and pack the frontend to webjars
72-
./ide.sh run # start the backend server
73-
```
74-
Server runs on port 8080 by default, visit localhost:8080 to check it out.
75-
76-
77-
### Run in a docker container
78-
79-
We've provides a docker image on docker hub: [webide](https://hub.docker.com/r/webide/webide/). Pull it and create a container, then run with command:
80-
```
81-
./ide.sh docker run
8265
```
83-
84-
#### Using `ide.sh`
85-
86-
If you make changes on source code, you can recompile and run with commands:
87-
```
88-
./ide.sh docker build
89-
./ide.sh docker run
90-
```
91-
92-
Listed below are all docker related command in `ide.sh`
93-
```
94-
./ide.sh docker build # create docker image
95-
./ide.sh docker run # create and start a container
96-
./ide.sh docker stop # stop container
97-
./ide.sh docker attach # attach container(use control-c to exit)
98-
./ide.sh docker logs # check container's logs
99-
./ide.sh docker exec # create a new Bash session in the container
100-
./ide.sh docker remove # remove container
101-
```
102-
103-
#### Using `docker` CLI
104-
105-
If you encounter any problem using `ide.sh`, try get around it using docker CLI directly.
106-
107-
##### Run
108-
109-
If app state persistency is not important to you (that is, app data will be gone when container get deleted), simply run this one-liner:
110-
```
111-
docker run -p 8080:8080 --name webide webide/webide
112-
```
113-
114-
Howerver, if you want to persist app state, you need to make sure `$HOME/.coding-ide-home` directories exist. If not, you need to **manually create them**, then run:
115-
```
116-
docker create -p 8080:8080 -v $HOME/.coding-ide-home:/home/coding/.coding-ide-home --name webide webide/webide
117-
```
118-
119-
Rebuild and run with:
120-
```
121-
docker build -t webide/webide
12266
docker run -p 8080:8080 --name webide webide/webide
12367
```
12468

125-
Listed below are other frequently used docker commands
126-
```
127-
# stop container
128-
docker stop webide
129-
130-
# attach container
131-
docker attach --sig-proxy=false webide
132-
133-
# check container's logs
134-
docker logs webide
135-
136-
# create a new Bash session in the container
137-
docker exec -it webide bash
138-
```
69+
To learn more about docker commands,please refer to wiki [English](https://github.com/Coding/WebIDE/wiki/Docker-Server.en) [中文](https://github.com/Coding/WebIDE/wiki/Docker-Server.zh)

0 commit comments

Comments
 (0)