Deploy your Wheels application to configured servers.
The wheels deploy:push
command builds and deploys your Wheels application to configured servers using Docker. It handles Docker image building, pushing to registry, and deploying to target servers with optional rolling deployments for zero-downtime updates.
tag=<string>
- Docker image tag (defaults to timestamp format: yyyymmddHHmmss)
--build
- Build Docker image locally (default: true, use --no-build to skip)
--push
- Push image to registry (default: true, use --no-push to skip)
--rolling
- Use rolling deployment for zero-downtime updates (default: true, use --no-rolling to disable)
servers=<string>
- Deploy to specific servers (comma-separated list)
destination=<string>
- Deployment destination/environment
timeout=<number>
- Deployment timeout in seconds (default: 600)
health-timeout=<number>
- Health check timeout in seconds (default: 300)
The deployment follows these steps:
Lock Acquisition: Acquire deployment lock to prevent concurrent deployments
Pre-connect Hook: Execute pre-connect lifecycle hook
Tag Generation: Generate timestamp-based tag if not provided
Pre-build Hook: Execute pre-build lifecycle hook
Docker Build: Build Docker image (if --build is enabled)
Registry Push: Push image to configured registry (if --push is enabled)
Pre-deploy Hook: Execute pre-deploy lifecycle hook
Server Deployment: Deploy to each target server
Copy environment configuration
Generate docker-compose.yml
Pull new image
Perform rolling deployment or restart
Clean up old images
Post-deploy Hook: Execute post-deploy lifecycle hook
Lock Release: Release deployment lock
When --rolling
is enabled (default), the deployment:
Scales up the service to run old and new containers simultaneously
Waits for health checks to pass on new containers
Removes old containers only after successful health checks
Rolls back automatically if health checks fail
The deployment uses health checks defined in your deploy.yml configuration:
Lifecycle hooks are executed at various stages:
pre-connect
: Before connecting to servers
pre-build
: Before building Docker image
pre-deploy
: Before deploying to servers
post-deploy
: After successful deployment
The deployment uses configuration from config/deploy.yml
:
Environment variables are loaded from .env.deploy
file and copied to target servers.
The command generates a docker-compose.yml file on target servers with:
Service configuration
Environment variables
Port mappings
Volume mounts
Health checks
Traefik labels (if enabled)
Database services (if configured)
Use semantic versioning: Tag releases with version numbers
Test in staging first: Deploy to staging before production
Monitor deployments: Check logs and health status
Use rolling deployments: Minimize downtime with --rolling
Configure health checks: Ensure proper health check endpoints
Set appropriate timeouts: Adjust timeouts based on app startup time
Use deployment locks: Prevent concurrent deployments
deploy exec - Execute deployment after push
deploy status - Check push status
deploy rollback - Rollback pushed artifacts