Skip to main content
CLI Proxy API provides official Docker images and Docker Compose configurations for easy deployment.

Quick Start

1

Pull the Docker image

2

Create configuration file

Create a config.yaml file based on the example configuration:
3

Run the container

Docker Compose Deployment

For production environments, use Docker Compose for easier management.

Using Pre-built Image

1

Create docker-compose.yml

docker-compose.yml
2

Start the service

3

View logs

Building from Source

To build the Docker image from source:
1

Clone the repository

2

Build with version information

3

Start the service

Alternatively, use the provided build script:
The script will prompt you to:
  1. Run using pre-built image (recommended)
  2. Build from source and run (for developers)

Volume Mounts

The container uses three volume mounts:

Configuration Volume

Mount your config.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:

Network Configuration

Exposed Ports

The default configuration exposes multiple ports:
  • 8317 - Main API server (default)
  • 8085 - Additional service port
  • 1455 - Additional service port
  • 54545 - Additional service port
  • 51121 - Additional service port
  • 11451 - Additional service port
Customize ports in your docker-compose.yml or with -p flags:

Timezone Configuration

The container sets timezone to Asia/Shanghai by default. The Dockerfile includes:
Override with the TZ environment variable:

Docker Build Script Features

The docker-build.sh script provides additional features:

Usage Statistics Preservation

Preserve usage statistics across container rebuilds:
On first run, you’ll be prompted for the management API key. The script:
  1. Exports usage statistics before stopping the container
  2. Rebuilds/restarts the container
  3. Imports statistics back into the new container
The API key is stored in 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