Deploy complex multi-service applications to Uncloud using standard Docker Compose files. Uncloud supports most Compose features with some useful extensions for cluster deployments.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/psviderski/uncloud/llms.txt
Use this file to discover all available pages before exploring further.
Quick start
Create acompose.yaml file and deploy:
Using uc deploy
Theuc deploy command reads your Compose file and deploys all defined services to your cluster.
Basic workflow
Deployment process
When you runuc deploy, Uncloud:
- Builds images for services with a
buildsection using your local Docker - Pushes built images directly to cluster machines (only missing layers are transferred)
- Plans the deployment showing what will change and asks for confirmation
- Creates missing volumes on target machines
- Deploys services using rolling updates with health monitoring
Compose file format
Uncloud supports the standard Compose Specification with some limitations and extensions.Basic example
compose.yaml
Supported features
Uncloud implements most common Compose features:Services
build: Build images from Dockerfileimage: Container image specificationcommand: Override default commandentrypoint: Override default entrypointenvironment: Environment variablesenv_file: Load environment from filevolumes: Named volumes, bind mounts, tmpfshealthcheck: Container health checkscpus: CPU limitsmem_limit: Memory limitsuser: Run as specific userprivileged: Extended privilegessysctls: Kernel parametersdevices: Device accessgpus: GPU access
Deploy configuration
mode:replicatedorglobalreplicas: Number of replicasupdate_config: Rolling update settings
Volumes
- Named Docker volumes
- Bind mounts
- Tmpfs mounts
- Volume labels
- External volumes
Configs
- File-based configs
- Inline configs
Uncloud-specific extensions
Uncloud adds custom extensions to enhance cluster deployments.x-ports: Publishing service ports
Expose services via Caddy reverse proxy or bind to host ports:- HTTP/HTTPS (ingress):
[hostname:]container_port[/protocol] - TCP/UDP (host):
[host_ip:]host_port:container_port[/protocol]@host
x-caddy: Custom reverse proxy configuration
Provide custom Caddyfile configuration for advanced routing:{{upstreams [port]}}: Space-separated list of healthy container IPs{{upstreams "service" port}}: Upstreams for another service{{.Name}}: Current service name
x-machines: Placement constraints
Restrict which machines can run your service:Multi-service deployments
Real-world example
Here’s the actualcompose.yaml from the Uncloud website deployment:
compose.yaml
Complex application stack
compose.yaml
Deployment options
Build arguments
Pass build-time variables:Skip building
Deploy configuration changes without rebuilding:Recreate containers
Force recreation even if nothing changed:Skip health monitoring
For faster emergency deployments:Auto-confirm in CI/CD
Skip confirmation prompt:Deploy specific services
Deploy only selected services and their dependencies:Use different files
Specify custom Compose files:Enable profiles
Activate Compose profiles:Service scaling
Set the number of replicas in your Compose file:deploy.replicas syntax:
Global services
Run one replica on every machine:Update configuration
Control rolling update behavior:Volume management
Named volumes
Create persistent volumes:External volumes
Use pre-created volumes:Bind mounts
Mount host directories:Tmpfs mounts
In-memory filesystems:Best practices
Use environment files
Use environment files
Store secrets and configuration in Reference in Compose:
.env files:.env
Pin image versions
Pin image versions
Use specific versions instead of
latest:Configure health checks
Configure health checks
Add health checks for reliable deployments:
Use multi-stage builds
Use multi-stage builds
Optimize image size with multi-stage Dockerfiles:
Externalize persistent volumes
Externalize persistent volumes
Mark persistent volumes as external to prevent accidental deletion:
Troubleshooting
View deployment plan without deploying
Uncloud shows the plan before executing. Review it carefully before confirming.Check service status
Deployment fails midway
Uncloud performs rolling updates one container at a time. If a deployment fails, successfully updated containers remain in the new state while others keep the old version. Runuc deploy again to retry the failed containers.
Image build failures
Check build logs for errors. Common issues:- Missing dependencies in Dockerfile
- Build context too large (use
.dockerignore) - Insufficient memory/disk space
Next steps
Deploying Services
Learn about uc run for single services
Rolling Updates
Zero-downtime deployment strategies
Scaling
Scale services across machines
Support Matrix
Complete list of supported Compose features
