Compose Stacks
HYPR supports Docker Compose files for deploying multi-service applications as coordinated VM stacks.Deploying a Stack
hypr-compose.yml,hypr-compose.yamlHyprfile,Hyprfile.yml,Hyprfile.yamldocker-compose.yml,docker-compose.yamlcompose.yml,compose.yaml
Stack Management
List Stacks
Stack Details
Destroy Stack
Compose File Format
HYPR supports Docker Compose v2 and v3 syntax.Basic Example
Service Configuration
image
Container image to run.build
Build image from Dockerfile.ports
Map host ports to container ports.environment
Set environment variables.Automatic .env Loading
HYPR automatically loads.env from the compose file directory, just like Docker Compose. No configuration needed.
env_file
Load additional environment files beyond the automatic.env.
.env(auto-loaded from compose directory)env_fileentries (in order listed)environmentsection (highest priority)
KEY=VALUE format, one per line. Comments (#) and empty lines are ignored. Values can be quoted.
volumes
Mount volumes into the VM. See Volumes for details.depends_on
Set service dependencies.networks
Connect to networks. See Networking for details.command
Override the default command.entrypoint
Override the entrypoint.working_dir
Set working directory.user
Set user.labels
Add metadata labels.Resource Limits
Use thedeploy section to set resource constraints.
Networks
Default Network
By default, all services in a stack share a default network and can communicate by service name.Custom Networks
Define isolated networks:proxycan reachapibut notdbapican reach bothproxyanddbdbcan only reachapi
Network Configuration
Volumes
Named Volumes
<stack-name>_pgdata and persists after compose down.
Bind Mounts
Volume Options
Complete Example
Command Options
hypr compose up
| Option | Description |
|---|---|
-f, --file <path> | Compose file path |
-n, --name <name> | Stack name (defaults to directory name) |
-d, --detach | Run in background |
--force-recreate | Recreate even if exists |
--build | Build images before deploying |
hypr compose down
| Option | Description |
|---|---|
-f, --force | Force destroy without confirmation |
hypr compose ps
List all stacks or show details of specific stack.hypr compose logs
Show logs for a service.Stack Naming
By default, stacks are named after the directory containing the compose file. Override with--name:
- VM names:
myproject-web,myproject-api - Volume names:
myproject_pgdata - Network names:
myproject_frontend
Environment Variable Substitution
Use variables in compose files:.env: