Skip to content

Commit

Permalink
readme一点小修改
Browse files Browse the repository at this point in the history
  • Loading branch information
Laceyoo committed Jan 11, 2024
1 parent d69ff13 commit 132671b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 28 deletions.
35 changes: 20 additions & 15 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,22 @@ chmod +x control
./control pack
```

### docker运行(内置测试的oauth2 server服务)
### docker运行

#### 1. 设置环境变量
(内置测试的oauth2 server服务)

`docker-compose.yml`文件中修改`cas-demo`容器的`environment`字段
#### 1.给`cas_init_script.sh`文件添加执行权限

执行如下命令
```shell
chmod +x cas_init_script.sh
```

#### 2. 修改`docker-compose.yml`文件

##### 2.1 设置环境变量

修改`cas-demo`容器的`environment`字段

```yaml
environment:
Expand All @@ -102,9 +113,9 @@ environment:
- SERVER_PORT=8444
```

#### 2. 修改端口映射
##### 2.2 修改端口映射

`docker-compose.yml`文件中修改容器的`ports`字段
修改容器的`ports`字段

如第1步中`SERVER_PORT`非默认值8444,则需将`cas-demo`容器的端口修改为`SERVER_PORT`的值,注意容器和宿主机端口必须相同

Expand All @@ -129,17 +140,8 @@ ports:
}
```

#### 4. (可选)自定义`cas_init_script.sh`脚本

给予执行权限

```shell
chmod +x cas_init_script.sh
```

根据需要对cas的配置进行修改,如数据库中增加用户

#### 5. 启动容器
#### 4. 启动容器

`docker-compose.yml`所在目录下执行如下命令

Expand All @@ -157,6 +159,9 @@ password:123456
可编辑`cas_init_script.sh`文件或启动后,进入`cas-demo`容器内部修改


#### (可选)自定义`cas_init_script.sh`脚本

根据需要对cas的配置进行修改,如数据库中增加用户

### 配置
#### 后端配置
Expand Down
30 changes: 17 additions & 13 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,16 @@ chmod +x control
### Running via Docker
(oauth2 server service with built-in tests)

#### 1. Setting environment variables
#### 1. Grant execute permission to the `cas_init_script.sh` file

Execute the following command
```shell
chmod +x cas_init_script.sh
```

#### 2. Modify the `docker-compose.yml` file

##### 2.1 Setting Environment Variables
Modify the `environment` field of the `cas-demo` container in the `docker-compose.yml` file

```yaml
Expand All @@ -102,7 +110,7 @@ environment:
- SERVER_PORT=8444
```

#### 2. Modify the port mapping
##### 2.2 Modify the port mapping

Modify the `ports` field of the container in the `docker-compose.yml` file

Expand All @@ -129,17 +137,7 @@ Set the `cas server` domain name in the `endpoints` field in the `cfg.json` file
}
```

#### 4. (Optional) Customize the `cas_init_script.sh` script

Grant execute permission to `cas_init_script.sh`

```shell
chmod +x cas_init_script.sh
```

Make changes to the cas configuration as needed, such as adding users to the database

#### 5. Start the container
#### 4. Start the container

Execute the following command in the directory where `docker-compose.yml` is located

Expand All @@ -158,6 +156,12 @@ password:123456
```
You can edit the `cas_init_script.sh` file or enter the `cas-demo` container after startup to update your user.


#### (Optional) Customize the `cas_init_script.sh` script

Make changes to the cas configuration as needed, such as adding users to the database


### Configuration
#### Backend Configuration
Refer to `cfg.json.example`, create `cfg.jon` configuration file, modify configuration as needed.
Expand Down

0 comments on commit 132671b

Please sign in to comment.