Quick Start
Create configuration file
Create a
config.yaml file based on the example configuration:Docker Compose Deployment
For production environments, use Docker Compose for easier management.Using Pre-built Image
Building from Source
To build the Docker image from source: Alternatively, use the provided build script:- Run using pre-built image (recommended)
- Build from source and run (for developers)
Volume Mounts
The container uses three volume mounts:| Volume | Path in Container | Purpose |
|---|---|---|
| Configuration | /CLIProxyAPI/config.yaml | Main configuration file |
| Authentication | /root/.cli-proxy-api | OAuth tokens and credentials |
| Logs | /CLIProxyAPI/logs | Application logs |
Configuration Volume
Mount yourconfig.yaml file:
Authentication Volume
Store OAuth tokens and credentials:Logs Volume
Persist application logs:Environment Variables
Docker Compose Variables
Customize deployment with environment variables:Build Arguments
When building from source:| Argument | Description | Default |
|---|---|---|
VERSION | Version tag | dev |
COMMIT | Git commit hash | none |
BUILD_DATE | Build timestamp | unknown |
Network Configuration
Exposed Ports
The default configuration exposes multiple ports:8317- Main API server (default)8085- Additional service port1455- Additional service port54545- Additional service port51121- Additional service port11451- Additional service port
docker-compose.yml or with -p flags:
Timezone Configuration
The container sets timezone toAsia/Shanghai by default. The Dockerfile includes:
TZ environment variable:
Docker Build Script Features
Thedocker-build.sh script provides additional features:
Usage Statistics Preservation
Preserve usage statistics across container rebuilds:- Exports usage statistics before stopping the container
- Rebuilds/restarts the container
- Imports statistics back into the new container
temp/stats/.api_secret for subsequent runs.
Health Check
Verify the service is running:Container Management
View Logs
Stop the Service
Restart the Service
Update to Latest Version
Next Steps
Cloud Deployment
Deploy in cloud environments with advanced configuration
Storage Backends
Configure PostgreSQL, Git, or Object Storage backends