Skip to main content

Arc Deploy CLI

A unified CLI tool for building and deploying Docker services to the Deploy Controller. Supports both single-service and monorepo architectures with configuration-driven deployments.

Features

  • Single Service & Monorepo Support: Deploy one service or manage multiple services from a single configuration
  • Configuration Inheritance: Shared settings via common section in monorepo configs
  • Unique Image Tagging: Automatic tag generation using Git SHA and timestamp
  • Flexible Deployment Options: Build only, build+push, or full deployment workflow
  • Pre-build Hooks: Run custom commands before docker build
  • Real-time Monitoring: Track deployment progress and status

📚 Documentation

Full documentation is available in the docs/ directory or served via MkDocs:

🚀 Quick Start

Installation

# Install via pip
pip install arc-deploy

# Or using uv
uv pip install arc-deploy

Single Service Configuration

Create deploy.yaml in your project root:

service_name: my_service
ecr_registry: 123.dkr.ecr.us-west-2.amazonaws.com
deploy_controller_url: https://deploy.example.com
aws_region: us-west-2

build:
  dockerfile: Dockerfile
  context: .
  build_args:
    NODE_ENV: production
  pre_commands:
    - pnpm install
    - pnpm run build

Deploy:

export WEBHOOK_TOKEN="your-token"
arc-deploy build-and-deploy --env test

Monorepo Configuration

Create deploy.yaml at repository root:

common:
  ecr_registry: 123.dkr.ecr.us-west-2.amazonaws.com
  deploy_controller_url: https://deploy.example.com
  aws_region: us-west-2

services:
  # 简化版本:不指定 service_name,使用 key 作为默认值
  api:
    build: { context: services/api }
  worker:
    build: { context: services/worker }
  
  # 完整版本:指定不同的 service_name(用于不同的 Docker 服务名)
  api-gateway:
    service_name: arc_api_gateway  # 可选:如果未指定,使用 key (api-gateway)
    build: { context: services/api-gateway }

Deploy:

# List available services
arc-deploy list-services

# Deploy specific service(s)
arc-deploy build-and-deploy --env test --service api
arc-deploy build-and-deploy --env prod --service api,worker

# Deploy all services
arc-deploy build-and-deploy --env test --all

Commands

build-and-deploy

Build Docker image, push to ECR, and deploy via Deploy Controller.

Options:

  • --env, -e: Deployment environment (test/prod) - Required
  • --config, -c: Configuration file path (default: deploy.yaml)
  • --service, -s: Service name(s) for monorepo (comma-separated or multiple flags)
  • --all: Deploy all services (monorepo only)
  • --tag, -t: Custom image tag (optional, defaults to auto-generated tag)
  • --skip-pre-build: Skip build pre-commands
  • --skip-push: Build only, skip push and deploy
  • --skip-deploy: Build and push only, skip deployment
  • --skip-pre-deploy: Deploy without running pre_deploy (for when the job itself is what fails)

Examples:

# Single service
arc-deploy build-and-deploy --env test

# Monorepo - specific service
arc-deploy build-and-deploy --env test --service api

# Monorepo - multiple services
arc-deploy build-and-deploy --env prod --service api,worker

# Build only (no push/deploy)
arc-deploy build-and-deploy --env test --skip-push

# Skip pre-build commands
arc-deploy build-and-deploy --env test --skip-pre-build

validate-config

Validate the deployment configuration file.

Options:

  • --config, -c: Configuration file path (default: deploy.yaml)

Example:

arc-deploy validate-config

build-only

Build Docker image only (no push or deploy).

Options:

  • --config, -c: Configuration file path (default: deploy.yaml)
  • --service, -s: Service name for monorepo
  • --tag, -t: Custom image tag (optional, defaults to auto-generated tag)
  • --skip-pre-build: Skip build pre-commands

Examples:

# Single service
arc-deploy build-only

# Monorepo
arc-deploy build-only --service api

# With custom tag
arc-deploy build-only --tag v1.0.0

# Skip pre-build commands
arc-deploy build-only --skip-pre-build

list-services

List all services in a monorepo configuration.

Options:

  • --config, -c: Configuration file path (default: deploy.yaml)

Example:

arc-deploy list-services

Environment Variables

  • WEBHOOK_TOKEN: Bearer token for Deploy Controller webhook authentication (required for deployments)
  • AWS_PROFILE: AWS profile name (or use standard AWS environment variables)
  • AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY: AWS credentials (if not using profile)

Configuration Reference

Field Description Required
service_name Service name in Deploy Controller Yes
ecr_registry ECR repository URL Yes
deploy_controller_url Base URL of Deploy Controller Yes
aws_region AWS region for ECR Yes
image_name Docker image name (defaults to service_name) No
target_services Swarm services to update with the image (defaults to service_name). A list updates them all at once; a list of lists updates one inner list at a time, starting the next only after every service in the previous one succeeded No
pre_deploy A command to run once before any service is updated, such as database migrations: command (argv list), environments (where it runs; it is skipped elsewhere) and service (whose container settings it runs with, default service_name). It runs the new image through the Deploy Controller (needs one with POST /api/webhooks/jobs); if it fails, nothing is deployed No
build.dockerfile Path to Dockerfile (default: Dockerfile) No
build.context Build context path (default: .) No
build.build_args Dictionary of build arguments No
build.pre_commands Pre-build commands (string or list) No

For monorepo configurations, see the Monorepo Guide for details on common and services sections.

Examples

Example configurations are available in the examples/ directory:

  • arc-nodejs-service.yaml - Single service example
  • arc-agent-gateway.yaml - Single service example
  • monorepo/deploy.yaml - Basic monorepo example
  • monorepo/deploy-fullstack.yaml - Fullstack app example

Development

For local development, install in editable mode:

cd cli
uv pip install -e .

License

MIT License - see LICENSE file for details.

Metadata

Release files for arc-deploy 0.1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arc-deploy 0.1.17
File Size Uploaded Provenance Actions
arc_deploy-0.1.17.tar.gz 22.1 kB Without provenance Details for arc_deploy-0.1.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for arc-deploy 0.1.17
File Interpreter ABI Platform Actions
arc_deploy-0.1.17-py3-none-any.whl Python 3 none any Details for arc_deploy-0.1.17-py3-none-any.whl

Total release size: 37.9 kB

Release files / arc_deploy-0.1.17.tar.gz

Download URL arc_deploy-0.1.17.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e288792b2e66aed430df634c2e5e3a9ad3e7d8a1325ddb6d658215c5a48ff565
BLAKE2b-256 checksum
How to use checksums
8b3c1758f8b6b8ba03d8e36ab80589bc4790a108155104ab6a3ed15044938775
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / arc_deploy-0.1.17-py3-none-any.whl

Download URL arc_deploy-0.1.17-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b3aa6c38aaf83310637a26988b7841e7cda564043047bf67805c8beea40960b
BLAKE2b-256 checksum
How to use checksums
2fdc9a9a5ffa92b41df669b796f6332295f9828dd84fad499ef808f4302ed5dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for arc-deploy 0.1.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page