Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chaitu426/minibox/llms.txt
Use this file to discover all available pages before exploring further.
minibox-compose.yaml is the single source of truth for a multi-container Minibox project. Every field maps directly to the Go struct in internal/models/compose.go. This page documents every supported key with types, defaults, and usage notes.
Top-Level Fields
The project name. Used as a prefix for container names (
<name>-<service>) and for service discovery scoping. Defaults to the name of the current working directory when omitted.A map of named service definitions. Each key becomes the service name and is used for container naming, log prefixes, and hostname resolution inside the project network.
Service Fields
Each entry underservices supports the following fields.
The container image to run. Required when
build is not specified. Accepts any image reference resolvable from Docker Hub (e.g. redis:latest, postgres:16-alpine).Path to a directory containing a
MiniBox file. When set, Compose automatically builds the image before starting the service and tags it <project>-<service>. Can coexist with image — build takes precedence.Override the default command defined in the image. Specified as a list of strings (exec form).
List of port mappings in
hostPort:containerPort format. Uses iptables DNAT rules on the host to forward traffic into the container.List of environment variables injected into the container process, each in
KEY=VALUE format.List of host-to-container bind mounts in
hostPath:containerPath format. The host path is mounted directly into the container rootfs at the specified container path.List of service names that must be running before this service starts. Compose uses these edges to build the startup DAG and determine topological order.
Enables database-optimized runtime settings for the container:
/dev/shmis mounted at 256 MB (overridable withshm_size).oom_score_adjis set to-900to protect the process from OOM eviction.- When
datais also set, a named persistent volume is provisioned automatically.
Only meaningful when
db_mode: true. Specifies the container path where the named persistent volume is mounted. Minibox provisions a volume directory under DataRoot/volumes/<project>-<service>-data and bind-mounts it at this path, so data persists across down/up cycles.Override the shared memory size (in megabytes) for the container’s
/dev/shm. Only applied when db_mode: true. Useful for tuning PostgreSQL’s shared_buffers or MongoDB’s WiredTiger cache.Override the Linux OOM killer score adjustment for the container process. Lower values make the process less likely to be killed when the host is under memory pressure.
db_mode: true sets this to -900 automatically; use this field to apply a custom value without enabling full db_mode.Run the container process as a specific user or UID. Accepts either a username string or a numeric UID.
Complete Annotated Example
The following file demonstrates every field in a realistic three-service project.Service names (
db, cache, api) are automatically injected into every container’s /etc/hosts, so connection strings like postgres://db:5432/shopdb resolve without any additional DNS setup. See Service Discovery for the full details.