- 移除文件中的控制字符和编码问题 - 简化注释避免字符编码冲突 - 保持所有配置功能不变 - 修复服务器部署时的yaml解析错误 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
775 B
YAML
32 lines
775 B
YAML
version: '3.4'
|
|
|
|
services:
|
|
new-api-custom:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: new-api-custom:latest
|
|
container_name: new-api-custom
|
|
restart: always
|
|
command: --log-dir /app/logs
|
|
ports:
|
|
- "3099:3000"
|
|
volumes:
|
|
- ./data:/data
|
|
- ./logs-custom:/app/logs
|
|
environment:
|
|
- SQL_DSN=root:123456@tcp(mysql:3306)/new-api
|
|
- REDIS_CONN_STRING=redis://redis
|
|
- TZ=Asia/Shanghai
|
|
- ERROR_LOG_ENABLED=true
|
|
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
|
|
|
|
networks:
|
|
new-api_default:
|
|
external: true |