Skip to main content
CLI Proxy API supports cloud deployment mode with dynamic configuration loading, allowing you to deploy without an initial configuration file.

Cloud Deploy Mode

Set the DEPLOY environment variable to cloud to enable cloud deployment mode:
In cloud mode, the server:
  1. Starts without requiring a valid configuration file
  2. Waits for configuration to be provided via mounted volumes or management API
  3. Begins serving requests once configuration is detected

Docker Deployment

Using Docker Compose

1

Create docker-compose.yml

docker-compose.yml
2

Create external volume

3

Start the service

The service starts and waits for configuration:
4

Mount configuration

Copy your configuration file to the volume:
The service detects the configuration and starts:

Using Docker Run

Configuration Detection

In cloud mode, the server checks for a valid configuration file at startup:
The server validates:
  1. Configuration file exists and is not a directory
  2. Configuration file is not empty
  3. Configuration contains a valid port setting

Environment Variables

Core Variables

Storage Backend Variables

See Storage Backends for remote storage configuration:
  • PostgreSQL: PGSTORE_DSN, PGSTORE_SCHEMA, PGSTORE_LOCAL_PATH
  • Git: GITSTORE_GIT_URL, GITSTORE_GIT_USERNAME, GITSTORE_GIT_TOKEN, GITSTORE_LOCAL_PATH
  • Object Storage: OBJECTSTORE_ENDPOINT, OBJECTSTORE_BUCKET, OBJECTSTORE_ACCESS_KEY, OBJECTSTORE_SECRET_KEY, OBJECTSTORE_LOCAL_PATH

Kubernetes Deployment

ConfigMap Approach

1

Create ConfigMap

configmap.yaml
2

Create Deployment

deployment.yaml
3

Create Service

service.yaml

Secret for Authentication

Store OAuth tokens in Kubernetes Secrets:
Mount the secret:

Configuration with Storage Backends

For production cloud deployments, use remote storage backends:

PostgreSQL Backend

docker-compose.yml

Git Backend

Object Storage Backend

Health Monitoring

Liveness Probe

Readiness Probe

Logging

Configure log output via configuration file:
config.yaml
In cloud environments, prefer stdout logging for integration with log aggregation systems:

Scaling Considerations

Stateless Deployment

When using remote storage backends (PostgreSQL, Git, or Object Storage), the service becomes stateless and can be scaled horizontally:

Local File Storage

With local file storage, use single-instance deployments or shared volumes:

Troubleshooting

Service Won’t Start

Check logs for configuration issues:
Common issues:
  • Missing DEPLOY=cloud variable
  • Invalid configuration file format
  • Missing required configuration fields (e.g., port)

Configuration Not Detected

Verify file is mounted correctly:

Storage Backend Connection Failed

Check environment variables and network connectivity:

Next Steps

Storage Backends

Configure PostgreSQL, Git, or Object Storage backends

Configuration

Learn about available configuration options