Documentation
¶
Overview ¶
Package compose loads Docker Compose files into a fully-resolved project model. It wraps the official compose-spec/compose-go reference loader (the same library Docker Compose itself uses) so that fruitbox parses, validates, interpolates, merges and normalizes compose files identically to `docker compose`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LoadOptions ¶
type LoadOptions struct {
// ConfigPaths are the compose files to load, in order. When empty, the
// loader discovers the default files (compose.yaml, docker-compose.yml, …)
// starting from WorkingDir.
ConfigPaths []string
// WorkingDir is the project working directory. When empty it defaults to
// the directory of the first config file (or the process cwd).
WorkingDir string
// ProjectName overrides the project name. When empty the name is derived
// from the working directory (or COMPOSE_PROJECT_NAME).
ProjectName string
// Profiles enables the named compose profiles.
Profiles []string
// EnvFiles are additional .env files to load before OS environment.
EnvFiles []string
// NoInterpolate disables ${VAR} interpolation (--no-interpolate).
NoInterpolate bool
// NoNormalize disables model normalization (--no-normalize).
NoNormalize bool
// NoConsistency skips the consistency check (--no-consistency).
NoConsistency bool
// NoResolvePaths leaves relative paths unresolved (--no-path-resolution).
NoResolvePaths bool
// NoEnvResolution skips computing service environments (--no-env-resolution).
NoEnvResolution bool
}
LoadOptions configures how a compose project is loaded. It mirrors the inputs `docker compose` accepts on the command line.
Click to show internal directories.
Click to hide internal directories.