{"record":{"id":"9866c0140e916fa1","repo":"jdx/mise","slug":"services-not-found-in-compose-config","errorCode":null,"errorMessage":"services not found in compose config: {}","messagePattern":"services not found in compose config: (.+?)","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/system/compose.rs","lineNumber":471,"sourceCode":"\n    fn inspect(&self) -> Result<ComposeInspection> {\n        let configured_services = self\n            .compose_output(&[\"config\".to_string(), \"--services\".to_string()])?\n            .lines()\n            .filter(|line| !line.trim().is_empty())\n            .map(|line| line.trim().to_string())\n            .collect::<IndexSet<_>>();\n        let target_services = if self.services.is_empty() {\n            configured_services.clone()\n        } else {\n            let missing = self\n                .services\n                .iter()\n                .filter(|service| !configured_services.contains(*service))\n                .cloned()\n                .collect::<Vec<_>>();\n            if !missing.is_empty() {\n                bail!(\n                    \"services not found in compose config: {}\",\n                    missing.join(\", \")\n                );\n            }\n            self.services.iter().cloned().collect()\n        };\n        let config_hashes = if self.state == ComposeState::Running {\n            parse_config_hashes(\n                &self.compose_output(&[\"config\".to_string(), \"--hash=*\".to_string()])?,\n            )?\n        } else {\n            HashMap::new()\n        };\n        let mut containers = parse_ps(&self.compose_output(&[\n            \"ps\".to_string(),\n            \"--all\".to_string(),\n            \"--format\".to_string(),\n            \"json\".to_string(),","sourceCodeStart":453,"sourceCodeEnd":489,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/compose.rs#L453-L489","documentation":"At converge time mise runs the project's compose config (with the resolved files/env-files) to enumerate the services it actually defines, then cross-checks your explicit `services` list against that set. Any configured service the compose project does not define is reported (comma-joined) and the run stops before touching containers.","triggerScenarios":"`services = [\"webb\"]` (typo), a service that lives in an overlay file not included via `files`, or a service renamed in the compose file after the mise config was written. The bail happens during action classification, i.e. on `mise bootstrap compose plan`/`apply` once the engine is reachable.","commonSituations":"Renaming services in docker-compose.yml during development; per-environment compose files where a service exists only in some overlays; stale config after upstream compose file changes.","solutions":["Run `docker compose -f <project_dir>/compose.yml config --services` (with the same `files`/`env_files` mise would use) to list valid names.","Fix the `services` (and `oneshot`) lists to match, or include the missing overlay via `files = [...]`.","Re-run `mise bootstrap compose plan` to confirm classification succeeds."],"exampleFix":"# before\n[bootstrap.compose.web]\nproject_dir = \"/srv/web\"\nservices = [\"webb\", \"api\"]\n\n# after  (docker compose config --services says: api, web)\n[bootstrap.compose.web]\nproject_dir = \"/srv/web\"\nservices = [\"web\", \"api\"]","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\n# preflight before mise bootstrap compose apply\ncd /srv/web\ndocker compose -f compose.yml -f compose.prod.yml config --services > /tmp/actual.txt\nfor s in web api; do\n  grep -qx \"$s\" /tmp/actual.txt || { echo \"service '$s' not defined\" >&2; exit 1; }\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `docker compose ... config --services` with the same files/env_files mise uses and keep the lists in sync.","Add a CI step that validates mise compose config against the rendered compose file after it changes."],"tags":["mise","bootstrap","compose","docker","service-not-found","runtime-validation"],"backgroundTag":"unknown-service-name","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}