Skip to content

Commit

Permalink
add cfg-docker and environment in docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheng Liang committed Jul 16, 2024
1 parent 6dd0c4f commit 4d9f295
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 14 deletions.
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ cd /export/data
sqlite3 cas.db
```

[//]: # (todo:这部分要修改)
- **cas的service**
- authorization_code | client_credentials | device_flow模式:
```txt
Expand Down
26 changes: 26 additions & 0 deletions cfg-docker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"logger": {
"dir": "logs/",
"level": "DEBUG",
"keepHours": 24
},
"endpoints": {
"authorization": "http://localhost/oauth2/authorize",
"token": "http://oauth-server-lite/oauth2/token",
"userinfo": "http://oauth-server-lite/oauth2/userinfo",
"device_authorization": "http://oauth-server-lite/oauth2/device/authorize"
},
"iplimit": {
"enable": false,
"trust_ip": ["127.0.0.1", "::1"]
},
"http": {
"route_base":"/",
"trust_proxy": ["127.0.0.1", "::1"],
"cors": ["http://127.0.0.1","http://localhost"],
"listen": "0.0.0.0:8080"
},
"trust_domain": ["api.ecnu.edu.cn", "localhost", "oauth-server-lite"],
"default_scope": "Basic",
"timeout": 10
}
32 changes: 18 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
version: '3'
services:
redis:
image: redis:latest
container_name: oauth-redis
ports:
- "6379:6379"
open-oauth2playground:
image: lacey620/open-oauth2playground:v1.0
image: open-oauth2playground:v2.0
container_name: open-oauth2playground
restart: always
ports:
- "8080:80"
- "8085:8080"
volumes:
- ./cfg.json:/app/Open-OAuth2Playground/cfg.json
- ./cfg-docker.json:/app/Open-OAuth2Playground/cfg.json
command: ["/app/Open-OAuth2Playground/OAuth2Playground"]
cas-demo:
image: lacey620/cas-demo:v6.5.9
container_name: cas-demo
oauth-server-lite:
# image: ecnunic/oauth-server-lite:v1.0
image: lite-server-test:0716
container_name: oauth-server-lite
depends_on:
- redis
restart: always
ports:
- "8444:8444"
environment:
- CAS_SERVER_NAME=
- SERVER_PORT=
volumes:
- ./cas_init_script.sh:/cas-overlay/cas_init_script.sh
entrypoint: ["/bin/bash", "-c"]
command: ["/cas-overlay/cas_init_script.sh && java -server -noverify -Xmx2048M -jar /cas-overlay/cas.war"]
- CLIENT_HOST=127.0.0.1
ports:
- "80:80"
- "8444:8444"

0 comments on commit 4d9f295

Please sign in to comment.