-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yaml
73 lines (67 loc) · 3.78 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 启动命令: docker-compose -p open-oauth2playground up -d
# -p [service name] 其中 server_name 可以替换为任意的服务名称
# container model: 容器模式。由 open-oauth2playground 容器网络统一暴露端口
# container 模式下的容器无法暴露自身端口
services:
open-oauth2playground:
image: ecnunic/open-oauth2playground:v0.2.0
container_name: open-oauth2playground
environment:
- CFG_INIT_ENABLE=1 # 是否初始化 cfg.json 配置文件
- PLAYGROUND_PORT=80 # oauth2playground 服务端口号
- OAUTH_SERVER_PORT=8081 # oauth-server-lite 服务端口号
- OAUTH_SERVER_HOST=localhost # oauth-server-lite 服务地址/域名
- OAUTH_SERVER_URL=http://localhost:8081 # oauth-server-lite 服务 URL
ports:
- "80:80" # open-oauth2playground 端口
# - "6379:6379" # redis 端口
# - "8080:8080" # apereo-cas 后端服务占用
- "8081:8081" # oauth-server-lite 前端服务
- "8444:8444" # apereo-cas 前端服务占用
networks:
- open-oauth2playground
# volumes:
# - ./oauth-server-lite/oauth2playground/cfg.json:/app/cfg.json
# - ./oauth-server-lite/oauth2playground/logs:/app/logs
restart: always
redis:
image: redis:alpine
container_name: oauth-redis
depends_on:
- open-oauth2playground
network_mode: container:open-oauth2playground
restart: always
oauth-server-lite:
image: ecnunic/oauth-server-lite:v0.3.0
container_name: oauth-server-lite
environment:
- INIT_ENABLE=1 # 是否通过环境变量配置全部文件 (与挂载配置文件冲突)
- CFG_INIT_ENABLE=1 # 是否通过环境变量配置 cfg.json 配置文件 (与挂载配置文件冲突)
- CAS_PROPERTIES_INIT_ENABLE=1 # 是否通过环境变量配置 cas_properties 配置文件 (与挂载配置文件冲突)
- OAUTH_CLIENT_ID=oauth # OAuth2 Client ID
- OAUTH_CLIENT_SECRET=123456 # OAuth2 Client Secret
- CAS_USERNAME=cas # CAS 用户名
- CAS_PASSWORD=123456 # CAS 用户密码
- OAUTH_SERVER_PORT=8081 # oauth-server-lite 服务端口号
- CAS_SERVER_PORT=8444 # apereo-cas 服务端口号
- CAS_SERVER_HOST=localhost # apereo-cas 服务地址/域名
- CAS_SERVER_URL=http://localhost:8444 # apereo-cas 服务 URL
- OAUTH_REDIS_DSN=localhost:6379 # redis 服务地址/域名
- OAUTH_REDIS_PASSWORD= # redis 服务连接密码
- PLAYGROUND_HOST=localhost # oauth2playground 服务地址/域名
- PLAYGROUND_PORT=80 # oauth2playground 服务端口号
depends_on:
- open-oauth2playground
- redis
network_mode: container:open-oauth2playground
# volumes:
# - ./oauth-server-lite/apereo-cas/cas.db:/app/apereo-cas/cas.db # apereo-cas 用户信息 sqlite 数据库
# - ./oauth-server-lite/apereo-cas/config:/etc/cas/config # apereo-cas 配置信息
# - ./oauth-server-lite/apereo-cas/services:/etc/cas/services # apereo-cas 服务配置
# - ./oauth-server-lite/oauth-server-lite/sqlite.db:/app/oauth-server-lite/sqlite.db # oauth-server-lite 认证信息 sqlite 数据库
# - ./oauth-server-lite/oauth-server-lite/cfg.json:/app/oauth-server-lite/cfg.json # oauth-server-lite 配置信息
# - ./oauth-server-lite/oauth-server-lite/logs:/app/oauth-server-lite/logs # oauth-server-lite 日志
restart: always
networks:
open-oauth2playground:
driver: bridge