This repository was archived by the owner on Dec 18, 2025. It is now read-only.
Repository navigation
v0.2.2: Configuration File Support for Deployment Targets
π 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_targetfield - Configure Portainer URLs in deploy-kit.toml via
portainer_urlfield - 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 --composeand 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.comAfter (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_KEYremains environment-variable-only (as it should!)- Recommended: Store secrets in
.env.sops(encrypted with SOPS) - Deploy-kit automatically decrypts
.env.sopsduring 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 DeployConfigsrc/deploy_kit/cli.py- Update validation logic to check config file (4 locations)templates/config/deploy-kit.toml.example- Document new configuration optionsREADME.md- Usage examples and precedence documentationdocs/existing-project-guide.md- Integration guide updatesdocs/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.tomlstill work - β
Existing
deploy-kit.tomlfiles 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