Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

v0.2.2: Configuration File Support for Deployment Targets

Choose a tag to compare

@mi-skam mi-skam released this 11 Dec 05:07
· 8 commits to main since this release

πŸŽ‰ What's New in v0.2.2

This release adds deploy-kit.toml configuration support for deployment targets, achieving full feature parity between environment variables and config files.

✨ New Features

  • Configure SSH targets in deploy-kit.toml via ssh_target field
  • Configure Portainer URLs in deploy-kit.toml via portainer_url field
  • Full 4-layer precedence: CLI argument > Environment variable > Config file > Default

πŸ’‘ Benefits

  • Eliminate repetitive environment variables on every deployment
  • Store deployment targets persistently in project configuration
  • Override targets easily via env vars or CLI args when needed
  • Streamlined workflow - just run deploy-kit up --compose and targets are read from config

πŸ“ Example Configuration

# deploy-kit.toml
[deploy]
# Deployment targets
ssh_target = "user@production.example.com"
portainer_url = "https://portainer.example.com"

# Build configuration
architecture = "linux/amd64"  # Cross-compile for x86_64 from ARM Mac
port = 8001
healthcheck_path = "/health"
keep_tarballs = 5

πŸš€ Usage Examples

Before (v0.2.1):

DEPLOY_ARCH=linux/amd64 DEPLOY_PORT=8001 deploy-kit up --compose user@production.example.com

After (v0.2.2):

# Simple deployment - reads everything from config
deploy-kit up --compose

# Override specific values when needed
DEPLOY_PORT=8002 deploy-kit up --compose staging-server

πŸ”’ Security Best Practices

  • PORTAINER_API_KEY remains environment-variable-only (as it should!)
  • Recommended: Store secrets in .env.sops (encrypted with SOPS)
  • Deploy-kit automatically decrypts .env.sops during deployment
  • Clear warnings in all documentation about never committing secrets to config files

πŸ“š Documentation Updates

  • README.md: Added config file examples to all usage sections
  • Configuration precedence: Detailed explanation with real-world examples
  • Getting Started Guides: Enhanced with deploy-kit.toml setup instructions
  • Template file: Comprehensive documentation for new configuration options

πŸ”§ Technical Changes

Files Modified (9 files, +112/-44 lines):

  • src/deploy_kit/config.py - Add ssh_target and portainer_url fields to DeployConfig
  • src/deploy_kit/cli.py - Update validation logic to check config file (4 locations)
  • templates/config/deploy-kit.toml.example - Document new configuration options
  • README.md - Usage examples and precedence documentation
  • docs/existing-project-guide.md - Integration guide updates
  • docs/new-project-guide.md - New project setup updates

Configuration Precedence Chain:

CLI argument (highest)
    ↓
Environment variable
    ↓
deploy-kit.toml  ← NEW!
    ↓
Built-in default (lowest)

βœ… Backward Compatibility

No breaking changes! All existing workflows continue to work:

  • βœ… CLI arguments still work
  • βœ… Environment variables still work
  • βœ… Projects without deploy-kit.toml still work
  • βœ… Existing deploy-kit.toml files without new fields still work

πŸ“¦ Installation

# Global install
uv tool install deploy-kit

# Or update existing installation
uv tool upgrade deploy-kit

# Or use as git submodule
git submodule add https://github.com/your-org/deploy-kit.git

πŸ™ Credits

πŸ€– Implemented with assistance from Claude Code


Full Changelog: https://github.com/your-org/deploy-kit/compare/v0.2.1...v0.2.2