mirror of
https://github.com/arch3rPro/1Panel-Appstore.git
synced 2026-05-11 20:21:38 +08:00
feat(应用商店): 新增 Claude Code Hub 应用配置
添加 Claude Code Hub 应用的完整配置,包括 logo、数据文件、README 文档和 docker-compose 部署文件
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 23000
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Web Port
|
||||
labelZh: Web端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
label:
|
||||
en: Web Port
|
||||
zh: Web端口
|
||||
ja: Webポート
|
||||
ko: Web 포트
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: ADMIN_TOKEN
|
||||
labelEn: Admin Token
|
||||
labelZh: 管理员令牌
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: password
|
||||
label:
|
||||
en: Admin Token
|
||||
zh: 管理员令牌
|
||||
ja: 管理者トークン
|
||||
ko: 관리자 토큰
|
||||
- default: postgres
|
||||
edit: true
|
||||
envKey: DB_USER
|
||||
labelEn: Database User
|
||||
labelZh: 数据库用户名
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
label:
|
||||
en: Database User
|
||||
zh: 数据库用户名
|
||||
ja: データベースユーザー
|
||||
ko: 데이터베이스 사용자
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: DB_PASSWORD
|
||||
labelEn: Database Password
|
||||
labelZh: 数据库密码
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: password
|
||||
label:
|
||||
en: Database Password
|
||||
zh: 数据库密码
|
||||
ja: データベースパスワード
|
||||
ko: 데이터베이스 비밀번호
|
||||
- default: claude_code_hub
|
||||
edit: true
|
||||
envKey: DB_NAME
|
||||
labelEn: Database Name
|
||||
labelZh: 数据库名称
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
label:
|
||||
en: Database Name
|
||||
zh: 数据库名称
|
||||
ja: データベース名
|
||||
ko: 데이터베이스 이름
|
||||
- default: "true"
|
||||
edit: true
|
||||
envKey: ENABLE_RATE_LIMIT
|
||||
labelEn: Enable Rate Limit
|
||||
labelZh: 启用限流
|
||||
required: false
|
||||
type: select
|
||||
values:
|
||||
- label: Enable
|
||||
value: "true"
|
||||
- label: Disable
|
||||
value: "false"
|
||||
label:
|
||||
en: Enable Rate Limit
|
||||
zh: 启用限流
|
||||
ja: レート制限を有効化
|
||||
ko: 속도 제한 활성화
|
||||
- default: "300"
|
||||
edit: true
|
||||
envKey: SESSION_TTL
|
||||
labelEn: Session TTL (seconds)
|
||||
labelZh: 会话过期时间(秒)
|
||||
required: false
|
||||
rule: paramCommon
|
||||
type: number
|
||||
label:
|
||||
en: Session TTL (seconds)
|
||||
zh: 会话过期时间(秒)
|
||||
ja: セッションTTL(秒)
|
||||
ko: 세션 TTL (초)
|
||||
- default: "true"
|
||||
edit: true
|
||||
envKey: AUTO_MIGRATE
|
||||
labelEn: Auto Database Migration
|
||||
labelZh: 自动数据库迁移
|
||||
required: false
|
||||
type: select
|
||||
values:
|
||||
- label: Enable
|
||||
value: "true"
|
||||
- label: Disable
|
||||
value: "false"
|
||||
label:
|
||||
en: Auto Database Migration
|
||||
zh: 自动数据库迁移
|
||||
ja: 自動データベース移行
|
||||
ko: 자동 데이터베이스 마이그레이션
|
||||
- default: "false"
|
||||
edit: true
|
||||
envKey: ENABLE_SECURE_COOKIES
|
||||
labelEn: Enable Secure Cookies (HTTPS only)
|
||||
labelZh: 启用安全Cookie(仅HTTPS)
|
||||
required: false
|
||||
type: select
|
||||
values:
|
||||
- label: Enable (HTTPS only)
|
||||
value: "true"
|
||||
- label: Disable (HTTP/HTTPS)
|
||||
value: "false"
|
||||
label:
|
||||
en: Enable Secure Cookies (HTTPS only)
|
||||
zh: 启用安全Cookie(仅HTTPS)
|
||||
ja: セキュアCookieを有効化(HTTPSのみ)
|
||||
ko: 보안 쿠키 활성화 (HTTPS만)
|
||||
@@ -0,0 +1,83 @@
|
||||
name: ${COMPOSE_PROJECT_NAME:-claude-code-hub}
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:18
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./.env
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER:-postgres}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
|
||||
POSTGRES_DB: ${DB_NAME:-claude_code_hub}
|
||||
PGDATA: /data/pgdata
|
||||
TZ: Asia/Shanghai
|
||||
PGTZ: Asia/Shanghai
|
||||
volumes:
|
||||
- ./data/postgres:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-claude_code_hub}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
networks:
|
||||
- 1panel-network
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data/redis:/data
|
||||
command: redis-server --appendonly yes
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
start_period: 5s
|
||||
networks:
|
||||
- 1panel-network
|
||||
app:
|
||||
container_name: ${CONTAINER_NAME}
|
||||
image: ghcr.io/ding113/claude-code-hub:v0.7.4
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- ./.env
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DSN: postgresql://${DB_USER:-postgres}:${DB_PASSWORD:-postgres}@postgres:5432/${DB_NAME:-claude_code_hub}
|
||||
REDIS_URL: redis://redis:6379
|
||||
AUTO_MIGRATE: ${AUTO_MIGRATE:-true}
|
||||
ENABLE_RATE_LIMIT: ${ENABLE_RATE_LIMIT:-true}
|
||||
ENABLE_SECURE_COOKIES: ${ENABLE_SECURE_COOKIES:-false}
|
||||
SESSION_TTL: ${SESSION_TTL:-300}
|
||||
DB_POOL_IDLE_TIMEOUT: ${DB_POOL_IDLE_TIMEOUT:-20}
|
||||
DB_POOL_CONNECT_TIMEOUT: ${DB_POOL_CONNECT_TIMEOUT:-10}
|
||||
MAX_RETRY_ATTEMPTS_DEFAULT: ${MAX_RETRY_ATTEMPTS_DEFAULT:-2}
|
||||
LANGFUSE_SAMPLE_RATE: ${LANGFUSE_SAMPLE_RATE:-1.0}
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:3000"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"node",
|
||||
"-e",
|
||||
"fetch('http://' + (process.env.HOSTNAME || '127.0.0.1') + ':3000/api/actions/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))",
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
networks:
|
||||
- 1panel-network
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
@@ -0,0 +1,72 @@
|
||||
# Claude Code Hub
|
||||
|
||||
智能 AI API 代理中转服务平台,面向团队的多供应商统一接入、弹性调度与精细化运营中心。
|
||||
|
||||
## 功能特点
|
||||
|
||||
- 🤖 **智能负载均衡**:权重 + 优先级 + 分组调度,内置熔断保护与最多 3 次故障转移,保障请求稳定
|
||||
- 🧩 **多供应商管理**:同时接入 Claude、Codex、Gemini CLI、OpenAI Compatible,自定义模型重定向与 HTTP/HTTPS/SOCKS 代理
|
||||
- 🛡️ **限流与并发控制**:RPM、金额(5 小时/周/月)、并发 Session 多维限制,Redis Lua 脚本确保原子性与 Fail-Open 降级
|
||||
- 📘 **自动化 OpenAPI 文档**:39 个 REST 端点由 Server Actions 自动生成 OpenAPI 3.1.0,Swagger + Scalar UI 双界面即刻试用
|
||||
- 📊 **实时监控与统计**:仪表盘、活跃 Session、消耗排行榜、决策链记录、代理状态追踪,秒级掌控运行态势
|
||||
- 💰 **价格表管理**:分页查询 + SQL 优化,支持搜索防抖、LiteLLM 同步,千级模型也能快速检索
|
||||
- 🔁 **Session 管理**:5 分钟上下文缓存,记录决策链,避免频繁切换供应商并保留全链路审计
|
||||
- 🔄 **OpenAI 兼容端点**:支持 `/v1/chat/completions`(OpenAI 兼容格式),工具调用与 reasoning 字段透传
|
||||
|
||||
## 使用说明
|
||||
|
||||
### 默认端口
|
||||
|
||||
- Web 界面: 23000
|
||||
|
||||
### 默认账号密码
|
||||
|
||||
- 管理员令牌: 请在部署时设置 `ADMIN_TOKEN` 环境变量(必须修改)
|
||||
|
||||
### 数据目录
|
||||
|
||||
应用数据存储在 `./data` 目录:
|
||||
|
||||
- PostgreSQL 数据: `./data/postgres`
|
||||
- Redis 数据: `./data/redis`
|
||||
|
||||
### 环境变量说明
|
||||
|
||||
#### 必需配置
|
||||
|
||||
- `ADMIN_TOKEN`: 管理员登录令牌(必须修改)
|
||||
- `DB_USER`: 数据库用户名
|
||||
- `DB_PASSWORD`: 数据库密码
|
||||
- `DB_NAME`: 数据库名称
|
||||
|
||||
#### 可选配置
|
||||
|
||||
- `ENABLE_RATE_LIMIT`: 是否启用限流(默认:true)
|
||||
- `SESSION_TTL`: 会话过期时间,单位秒(默认:300)
|
||||
- `AUTO_MIGRATE`: 是否自动执行数据库迁移(默认:true)
|
||||
- `ENABLE_SECURE_COOKIES`: 是否启用安全 Cookie(默认:false)
|
||||
- **重要**:如果使用 HTTP 部署(非 HTTPS),请保持为 `false`
|
||||
- 如果使用 HTTPS 部署,建议设置为 `true` 以提高安全性
|
||||
- 设置为 `true` 时,浏览器将拒绝在 HTTP 连接下设置 Cookie,导致无法登录
|
||||
|
||||
### 访问应用
|
||||
|
||||
部署成功后,可以通过以下地址访问:
|
||||
|
||||
- **管理后台**:`http://localhost:23000`(使用 `ADMIN_TOKEN` 登录)
|
||||
- **API 文档(Scalar UI)**:`http://localhost:23000/api/actions/scalar`
|
||||
- **API 文档(Swagger UI)**:`http://localhost:23000/api/actions/docs`
|
||||
|
||||
## 相关链接
|
||||
|
||||
- 官方网站: https://github.com/ding113/claude-code-hub
|
||||
- GitHub: https://github.com/ding113/claude-code-hub
|
||||
- 文档: https://github.com/ding113/claude-code-hub/blob/main/README.md
|
||||
|
||||
## 技术栈
|
||||
|
||||
- **框架**: Next.js 15 + Hono
|
||||
- **数据库**: PostgreSQL 18
|
||||
- **缓存**: Redis 7
|
||||
- **运行时**: Node.js / Bun
|
||||
- **语言**: TypeScript
|
||||
@@ -0,0 +1,72 @@
|
||||
# Claude Code Hub
|
||||
|
||||
Intelligent AI API Gateway and Management Platform for unified multi-provider access, elastic scheduling, and refined operations.
|
||||
|
||||
## Features
|
||||
|
||||
- 🤖 **Intelligent Load Balancing**: Weight + priority + group scheduling with built-in circuit breaker protection and up to 3 failover attempts
|
||||
- 🧩 **Multi-Provider Management**: Support for Claude, Codex, Gemini CLI, OpenAI Compatible with custom model redirection and HTTP/HTTPS/SOCKS proxy
|
||||
- 🛡️ **Rate Limiting & Concurrency Control**: Multi-dimensional limits including RPM, cost (5h/weekly/monthly), concurrent sessions with Redis Lua scripts for atomic operations
|
||||
- 📘 **Auto-generated OpenAPI Documentation**: 39 REST endpoints with OpenAPI 3.1.0, Swagger + Scalar UI interfaces
|
||||
- 📊 **Real-time Monitoring & Statistics**: Dashboard, active sessions, consumption leaderboard, decision chain records, proxy status tracking
|
||||
- 💰 **Price Table Management**: Paginated queries with SQL optimization, search debouncing, LiteLLM sync support
|
||||
- 🔁 **Session Management**: 5-minute context cache with decision chain recording for full audit trail
|
||||
- 🔄 **OpenAI Compatible Endpoints**: Support for `/v1/chat/completions` with tool calling and reasoning field passthrough
|
||||
|
||||
## Usage
|
||||
|
||||
### Default Port
|
||||
|
||||
- Web UI: 23000
|
||||
|
||||
### Default Credentials
|
||||
|
||||
- Admin Token: Set the `ADMIN_TOKEN` environment variable during deployment (must be changed)
|
||||
|
||||
### Data Directory
|
||||
|
||||
Application data is stored in the `./data` directory:
|
||||
|
||||
- PostgreSQL data: `./data/postgres`
|
||||
- Redis data: `./data/redis`
|
||||
|
||||
### Environment Variables
|
||||
|
||||
#### Required Configuration
|
||||
|
||||
- `ADMIN_TOKEN`: Admin login token (must be changed)
|
||||
- `DB_USER`: Database username
|
||||
- `DB_PASSWORD`: Database password
|
||||
- `DB_NAME`: Database name
|
||||
|
||||
#### Optional Configuration
|
||||
|
||||
- `ENABLE_RATE_LIMIT`: Enable rate limiting (default: true)
|
||||
- `SESSION_TTL`: Session TTL in seconds (default: 300)
|
||||
- `AUTO_MIGRATE`: Auto-execute database migrations (default: true)
|
||||
- `ENABLE_SECURE_COOKIES`: Enable secure cookies (default: false)
|
||||
- **Important**: Keep as `false` if deploying with HTTP (not HTTPS)
|
||||
- If deploying with HTTPS, it's recommended to set to `true` for better security
|
||||
- When set to `true`, browsers will refuse to set cookies over HTTP connections, preventing login
|
||||
|
||||
### Access the Application
|
||||
|
||||
After successful deployment, access the application at:
|
||||
|
||||
- **Dashboard**: `http://localhost:23000` (login with `ADMIN_TOKEN`)
|
||||
- **API Docs (Scalar UI)**: `http://localhost:23000/api/actions/scalar`
|
||||
- **API Docs (Swagger UI)**: `http://localhost:23000/api/actions/docs`
|
||||
|
||||
## Links
|
||||
|
||||
- Website: https://github.com/ding113/claude-code-hub
|
||||
- GitHub: https://github.com/ding113/claude-code-hub
|
||||
- Documentation: https://github.com/ding113/claude-code-hub/blob/main/README.md
|
||||
|
||||
## Tech Stack
|
||||
|
||||
- **Framework**: Next.js 15 + Hono
|
||||
- **Database**: PostgreSQL 18
|
||||
- **Cache**: Redis 7
|
||||
- **Runtime**: Node.js / Bun
|
||||
- **Language**: TypeScript
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Claude Code Hub
|
||||
tags:
|
||||
- 开发工具
|
||||
- AI
|
||||
- API网关
|
||||
title: 智能 AI API 代理中转服务平台
|
||||
description: 智能 AI API 代理中转服务平台
|
||||
additionalProperties:
|
||||
key: claude-code-hub
|
||||
name: Claude Code Hub
|
||||
tags:
|
||||
- DevTool
|
||||
- AI
|
||||
- APIGateway
|
||||
shortDescZh: 智能 AI API 代理中转服务平台
|
||||
shortDescEn: Intelligent AI API Gateway and Management Platform
|
||||
description:
|
||||
en: Claude Code Hub is an intelligent AI API gateway that provides unified access to multiple AI providers (Claude, OpenAI, Gemini, Codex) with load balancing, rate limiting, monitoring, and comprehensive management features.
|
||||
zh: Claude Code Hub 是一个智能 AI API 代理中转服务平台,提供多供应商统一接入、智能负载均衡、限流控制、实时监控和精细化管理功能。
|
||||
type: website
|
||||
crossVersionUpdate: true
|
||||
limit: 0
|
||||
recommend: 0
|
||||
website: https://github.com/ding113/claude-code-hub
|
||||
github: https://github.com/ding113/claude-code-hub
|
||||
document: https://github.com/ding113/claude-code-hub/blob/main/README.md
|
||||
architectures:
|
||||
- amd64
|
||||
- arm64
|
||||
@@ -0,0 +1,131 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 23000
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Web Port
|
||||
labelZh: Web端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
label:
|
||||
en: Web Port
|
||||
zh: Web端口
|
||||
ja: Webポート
|
||||
ko: Web 포트
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: ADMIN_TOKEN
|
||||
labelEn: Admin Token
|
||||
labelZh: 管理员令牌
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: password
|
||||
label:
|
||||
en: Admin Token
|
||||
zh: 管理员令牌
|
||||
ja: 管理者トークン
|
||||
ko: 관리자 토큰
|
||||
- default: postgres
|
||||
edit: true
|
||||
envKey: DB_USER
|
||||
labelEn: Database User
|
||||
labelZh: 数据库用户名
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
label:
|
||||
en: Database User
|
||||
zh: 数据库用户名
|
||||
ja: データベースユーザー
|
||||
ko: 데이터베이스 사용자
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: DB_PASSWORD
|
||||
labelEn: Database Password
|
||||
labelZh: 数据库密码
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: password
|
||||
label:
|
||||
en: Database Password
|
||||
zh: 数据库密码
|
||||
ja: データベースパスワード
|
||||
ko: 데이터베이스 비밀번호
|
||||
- default: claude_code_hub
|
||||
edit: true
|
||||
envKey: DB_NAME
|
||||
labelEn: Database Name
|
||||
labelZh: 数据库名称
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
label:
|
||||
en: Database Name
|
||||
zh: 数据库名称
|
||||
ja: データベース名
|
||||
ko: 데이터베이스 이름
|
||||
- default: "true"
|
||||
edit: true
|
||||
envKey: ENABLE_RATE_LIMIT
|
||||
labelEn: Enable Rate Limit
|
||||
labelZh: 启用限流
|
||||
required: false
|
||||
type: select
|
||||
values:
|
||||
- label: Enable
|
||||
value: "true"
|
||||
- label: Disable
|
||||
value: "false"
|
||||
label:
|
||||
en: Enable Rate Limit
|
||||
zh: 启用限流
|
||||
ja: レート制限を有効化
|
||||
ko: 속도 제한 활성화
|
||||
- default: "300"
|
||||
edit: true
|
||||
envKey: SESSION_TTL
|
||||
labelEn: Session TTL (seconds)
|
||||
labelZh: 会话过期时间(秒)
|
||||
required: false
|
||||
rule: paramCommon
|
||||
type: number
|
||||
label:
|
||||
en: Session TTL (seconds)
|
||||
zh: 会话过期时间(秒)
|
||||
ja: セッションTTL(秒)
|
||||
ko: 세션 TTL (초)
|
||||
- default: "true"
|
||||
edit: true
|
||||
envKey: AUTO_MIGRATE
|
||||
labelEn: Auto Database Migration
|
||||
labelZh: 自动数据库迁移
|
||||
required: false
|
||||
type: select
|
||||
values:
|
||||
- label: Enable
|
||||
value: "true"
|
||||
- label: Disable
|
||||
value: "false"
|
||||
label:
|
||||
en: Auto Database Migration
|
||||
zh: 自动数据库迁移
|
||||
ja: 自動データベース移行
|
||||
ko: 자동 데이터베이스 마이그레이션
|
||||
- default: "false"
|
||||
edit: true
|
||||
envKey: ENABLE_SECURE_COOKIES
|
||||
labelEn: Enable Secure Cookies (HTTPS only)
|
||||
labelZh: 启用安全Cookie(仅HTTPS)
|
||||
required: false
|
||||
type: select
|
||||
values:
|
||||
- label: Enable (HTTPS only)
|
||||
value: "true"
|
||||
- label: Disable (HTTP/HTTPS)
|
||||
value: "false"
|
||||
label:
|
||||
en: Enable Secure Cookies (HTTPS only)
|
||||
zh: 启用安全Cookie(仅HTTPS)
|
||||
ja: セキュアCookieを有効化(HTTPSのみ)
|
||||
ko: 보안 쿠키 활성화 (HTTPS만)
|
||||
@@ -0,0 +1,83 @@
|
||||
name: ${COMPOSE_PROJECT_NAME:-claude-code-hub}
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:18
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./.env
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER:-postgres}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
|
||||
POSTGRES_DB: ${DB_NAME:-claude_code_hub}
|
||||
PGDATA: /data/pgdata
|
||||
TZ: Asia/Shanghai
|
||||
PGTZ: Asia/Shanghai
|
||||
volumes:
|
||||
- ./data/postgres:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-claude_code_hub}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
networks:
|
||||
- 1panel-network
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data/redis:/data
|
||||
command: redis-server --appendonly yes
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
start_period: 5s
|
||||
networks:
|
||||
- 1panel-network
|
||||
app:
|
||||
container_name: ${CONTAINER_NAME}
|
||||
image: ghcr.io/ding113/claude-code-hub:latest
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- ./.env
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DSN: postgresql://${DB_USER:-postgres}:${DB_PASSWORD:-postgres}@postgres:5432/${DB_NAME:-claude_code_hub}
|
||||
REDIS_URL: redis://redis:6379
|
||||
AUTO_MIGRATE: ${AUTO_MIGRATE:-true}
|
||||
ENABLE_RATE_LIMIT: ${ENABLE_RATE_LIMIT:-true}
|
||||
ENABLE_SECURE_COOKIES: ${ENABLE_SECURE_COOKIES:-false}
|
||||
SESSION_TTL: ${SESSION_TTL:-300}
|
||||
DB_POOL_IDLE_TIMEOUT: ${DB_POOL_IDLE_TIMEOUT:-20}
|
||||
DB_POOL_CONNECT_TIMEOUT: ${DB_POOL_CONNECT_TIMEOUT:-10}
|
||||
MAX_RETRY_ATTEMPTS_DEFAULT: ${MAX_RETRY_ATTEMPTS_DEFAULT:-2}
|
||||
LANGFUSE_SAMPLE_RATE: ${LANGFUSE_SAMPLE_RATE:-1.0}
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:3000"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"node",
|
||||
"-e",
|
||||
"fetch('http://' + (process.env.HOSTNAME || '127.0.0.1') + ':3000/api/actions/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))",
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
networks:
|
||||
- 1panel-network
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
Reference in New Issue
Block a user