ops.toml Schema Reference
# App name (legacy single-app mode)
# One of `app` or `project` is required
app = "string"
# Project name (multi-app project mode)
project = "string"
# Deployment target in "app.project" format
# Optional in project mode (auto-resolved via API)
target = "string"
# Required: Remote directory to deploy to
deploy_path = "string"
# Required: Deployment configuration
[deploy]
# Source type: "git", "push", or "image"
# Default: "git"
source = "git"
# Git branch to deploy
# Default: "main"
branch = "main"
# Docker-compose file paths (optional)
# Used with all source types
compose_files = ["docker-compose.yml", "docker-compose.prod.yml"]
# Git configuration (required when source = "git")
[deploy.git]
# Git repository URL
repo = "[email protected]:org/repo.git"
# Path to SSH deploy key (optional)
# Supports ~ expansion
ssh_key = "~/.ssh/deploy_key"
# Container registry (optional, used with source = "image")
[deploy.registry]
# Registry URL
url = "ghcr.io"
# Auth token (supports $ENV_VAR syntax)
token = "$GHCR_PAT"
# Username (optional, defaults to "oauth2")
username = "oauth2"
# App group definitions (optional, repeatable)
# Used with `ops deploy --app <name>` to deploy a subset of services
[[apps]]
# Group name
name = "api"
# Docker-compose service names in this group
services = ["api_server", "api_worker"]
# Environment file mappings (optional, repeatable)
[[env_files]]
# Local file path
local = ".env.production"
# Remote path relative to deploy_path
remote = ".env"
# Directory sync mappings (optional, repeatable)
[[sync]]
# Local directory or file
local = "./configs"
# Remote path relative to deploy_path
remote = "configs"
# Nginx route definitions (optional, repeatable)
[[routes]]
# Domain name for nginx server_name
domain = "api.example.com"
# Backend port to proxy to
port = 3000
# Enable SSL via certbot
# Default: false
ssl = true
# Health checks (optional, repeatable)
[[healthchecks]]
# Display name
name = "API Health"
# URL to check (retried 10 times, 2s intervals)
url = "http://localhost:3000/health"Deploy Sources
git
gitpush
pushimage
imageApp Groups
Nginx Configuration
Last updated
