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:

  1. Pulls/loads the image - From registry or local transfer
  2. Starts new container - With configured environment and options
  3. Waits for health check - Default timeout: 60 seconds
  4. Updates Caddy routing - For web roles only
  5. Drains old container - Removes from load balancer, waits for connections
  6. Stops old container - Graceful shutdown
  7. Cleans up - Keeps 2 most recent containers

Exit codes

CodeMeaning
0Success
1General error
2Configuration error
3Connection error
4Health check failed

Environment variables

ODYSSEUS_MASTER_KEY

Master key for decrypting secrets.

ODYSSEUS_MASTER_KEY=your-key odysseus deploy --image v1.0.0

  • build - Build Docker images
  • pussh - Transfer images to servers
  • status - Check deployment status
  • logs - View application logs
Previous
Logging and debugging