完整更新:恢复所有自定义配置
✅ 已同步官方 v0.9.0-alpha.8 ✅ 已恢复 Footer 自定义页脚 ✅ 已恢复 Claude 穿透功能 ✅ 已恢复 Docker 自定义配置 (端口3099) ✅ 已恢复 Channel 计费逻辑增强 ✅ 已创建更新手册和部署脚本 关键配置: - docker-compose-custom.yml: 使用3099端口,连接现有mysql/redis - controller/channel-billing.go: 包含渠道状态报告功能 - temp/: 包含更新手册和自动化脚本 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
34
docker-compose-custom.yml
Normal file
34
docker-compose-custom.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
new-api-custom:
|
||||
image: new-api-custom:latest
|
||||
container_name: new-api-custom
|
||||
restart: always
|
||||
command: --log-dir /app/logs
|
||||
ports:
|
||||
- "3099:3000" # 使用3099端口
|
||||
volumes:
|
||||
- ./data:/data # 共享相同数据目录
|
||||
- ./logs-custom:/app/logs # 使用独立日志目录
|
||||
environment:
|
||||
- SQL_DSN=root:123456@tcp(mysql:3306)/new-api # 连接现有的mysql容器
|
||||
- REDIS_CONN_STRING=redis://redis # 连接现有的redis容器
|
||||
- TZ=Asia/Shanghai
|
||||
- ERROR_LOG_ENABLED=true
|
||||
# - STREAMING_TIMEOUT=120
|
||||
# - SESSION_SECRET=random_string # 如果需要多机部署
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q -O - http://localhost:3000/api/status | grep -o '\"success\":\\s*true' | awk -F: '{print $$2}'"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
networks:
|
||||
- new-api_default # 连接到现有的网络,复用现有的 redis 和 mysql
|
||||
|
||||
# 不定义 redis 和 mysql 服务,直接使用现有运行的容器
|
||||
# 只需要连接到相同的网络即可访问
|
||||
|
||||
networks:
|
||||
new-api_default:
|
||||
external: true # 使用现有的网络
|
||||
Reference in New Issue
Block a user