Skip to main content

parse_config

Function parse_config 

Source
pub fn parse_config(
    stdout: &str,
    compose_file: &Path,
    project_dir: &Path,
) -> Result<RigPlan, CoreError>
Expand description

Parse docker compose config --format json output into a RigPlan skeleton: .name is THE identity truth (honors the rig’s own .env COMPOSE_PROJECT_NAME), services are the service map’s keys, port_mappings the collected target→published pairs, volumes the volume map’s keys. Tolerant where compose is shape-shifty (published arrives as string OR number; the doc may be a bare object — current compose — or a single-element array — older builds); loud where identity is at stake (no .name → error, never an implicit directory-name project).