-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yaml
54 lines (49 loc) · 2.85 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
# 启动命令: docker-compose -p oauth-server-lite up -d
# -p [service name] 其中 server_name 可以替换为任意的服务名称
# container model: 容器模式。由 redis 容器网络统一暴露端口
# container 模式下的容器无法暴露自身端口
services:
redis:
image: redis:alpine
container_name: oauth-redis
ports:
# - "6379:6379" # redis 端口
# - "8080:8080" # apereo-cas 后端服务占用
- "8081:8081" # oauth-server-lite 前端服务
- "8444:8444" # apereo-cas 前端服务占用
networks:
- oauth-server-lite
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:
- redis
network_mode: container:redis
# 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:
oauth-server-lite:
driver: bridge