-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (56 loc) · 2.41 KB
/
docker-compose.yml
File metadata and controls
63 lines (56 loc) · 2.41 KB
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
services:
qbin:
image: naiher/qbin:latest
container_name: qbin
restart: always
environment:
# 必选环境变量
- ADMIN_EMAIL=admin@qbin.github # 请修改为你的邮箱
- ADMIN_PASSWORD=qbin # 请修改为安全的密码
- JWT_SECRET=your_jwt_secret # 请修改为随机安全字符串
# 可选环境变量
- PORT=8000
- TOKEN_EXPIRE=31536000
- MAX_UPLOAD_FILE_SIZE=52428800
- DB_CLIENT=sqlite
- DATABASE_URL="file:/app/data/qbin_local.db"
- ENABLE_ANONYMOUS_ACCESS=1
# GitHub OAuth配置(可选,如需使用请取消注释并填写)
# - GITHUB_CLIENT_ID=your_github_client_id
# - GITHUB_CLIENT_SECRET=your_github_client_secret
# - GITHUB_CALLBACK_URL=http://your-domain:8000/api/login/oauth2/callback/github
# Google OAuth配置(可选,如需使用请取消注释并填写)
# - GOOGLE_CLIENT_ID=your_google_client_id
# - GOOGLE_CLIENT_SECRET=your_google_client_secret
# - GOOGLE_CALLBACK_URL=http://your-domain:8000/api/login/oauth2/callback/google
# Microsoft OAuth配置(可选,如需使用请取消注释并填写)
# - MICROSOFT_CLIENT_ID=74xxxx-xxxx-xxxx-xxxx-xxxxxxxxxx # Microsoft应用ID
# - MICROSOFT_CLIENT_SECRET=25xxxx-xxxx-xxxx-xxxx-xxxxxxxxxx # Microsoft应用密钥
# - MICROSOFT_CALLBACK_URL=http://localhost:8000/api/login/oauth2/callback/microsoft # Microsoft登录回调地址
# Custom OAuth配置(可选,如需使用请取消注释并填写)
# - OAUTH_CLIENT_ID=V4HmbQixxxxxxxxxxxxCJ2CVypqL
# - OAUTH_CLIENT_SECRET=hZtE3cxxxxxxxxxxxxxkZ0al01Hi
# - OAUTH_AUTH_URL=https://provider.example.com/oauth2/authorize
# - OAUTH_TOKEN_URL=https://provider.example.com/oauth2/token
# - OAUTH_CALLBACK_URL=http://localhost:8000/api/login/oauth2/callback/custom
# - OAUTH_SCOPES=user:profile
# - OAUTH_USER_INFO_URL=https://provider.example.com/api/user
volumes:
- ~/qbin-data:/app/data # 持久化存储数据库文件
ports:
- "8000:8000"
networks:
- qbin-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
volumes:
qbin-data: # 定义用于存储SQLite数据库的卷
driver: local
networks:
qbin-network:
driver: bridge
internal: false