CLI Reference
deploy
Deploy your application to production servers.
Synopsis
odysseus deploy [options]
Deploy your Docker containers to configured servers with zero-downtime rolling updates.
Options
--config FILE
Path to configuration file. Default: deploy.yml
odysseus deploy --config production.yml --image v1.0.0
--image TAG
Required. Docker image tag to deploy.
odysseus deploy --image v1.0.0
odysseus deploy --image latest
odysseus deploy --image abc123def # Git SHA
--build
Build the Docker image before deploying.
odysseus deploy --build --image v1.0.0
When used with a registry configuration, the image is pushed after building. Without a registry, the image is transferred directly to servers.
--dry-run
Show what would be deployed without making changes.
odysseus deploy --dry-run --image v1.0.0
Output:
Dry run mode - no changes will be made
Would deploy to:
web:
- app1.example.com
- app2.example.com
jobs:
- worker.example.com
Image: myregistry/myapp:v1.0.0
--verbose, -v
Show detailed SSH commands being executed.
odysseus deploy --verbose --image v1.0.0
Output includes every command:
[app.example.com] docker pull myregistry/myapp:v1.0.0
[app.example.com] docker run -d --name myapp-web-v1.0.0 ...
[app.example.com] Waiting for health check...
Examples
Basic deployment
Deploy a pre-built image:
odysseus deploy --image v1.0.0
Build and deploy
Build locally and deploy:
odysseus deploy --build --image v1.0.0
Deploy with custom config
odysseus deploy --config staging.yml --image v1.0.0
Debug deployment
odysseus deploy --verbose --image v1.0.0
Test before deploying
odysseus deploy --dry-run --image v1.0.0
Deployment process
For each server and role, Odysseus:
- Pulls/loads the image - From registry or local transfer
- Starts new container - With configured environment and options
- Waits for health check - Default timeout: 60 seconds
- Updates Caddy routing - For web roles only
- Drains old container - Removes from load balancer, waits for connections
- Stops old container - Graceful shutdown
- Cleans up - Keeps 2 most recent containers
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Configuration error |
| 3 | Connection error |
| 4 | Health check failed |
Environment variables
ODYSSEUS_MASTER_KEY
Master key for decrypting secrets.
ODYSSEUS_MASTER_KEY=your-key odysseus deploy --image v1.0.0