{"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":null,"httpStatus":null,"severity":"error","filePath":"src/system/compose.rs","lineNumber":528,"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":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/compose.rs#L510-L546","documentation":"Thrown during `inspect` when one or more services requested in the config cannot be found in the actual compose configuration produced by the compose file(s). The compose file is the source of truth for what exists; requesting an unknown service would leave mise with nothing to track, so it fails with the list of missing services.","triggerScenarios":"Calling inspect on a bootstrap compose project whose configured `services` (or oneshot entries) are absent from the compose file referenced by `files`. The error message lists the missing service names.","commonSituations":"Service renamed or removed from docker-compose.yml while mise config still lists it; mise config pointing at the wrong/outdated compose file; YAML indentation placing the service under the wrong key.","solutions":["Update the mise config's `services`/`oneshot` lists to match the services defined in the compose file","Add the missing service to the compose file","Verify `files` points at the intended docker-compose.yml"],"exampleFix":"# before (compose file only defines db)\n[system.compose.myproj]\nservices = [\"db\", \"api\"]\n# after\n[system.compose.myproj]\nservices = [\"db\"]","handlingStrategy":"validation","validationCode":"# verify configured services exist in the compose file first\ndocker compose -f docker-compose.yml config --services | grep -x -f services.txt","typeGuard":null,"tryCatchPattern":"try {\n    project.inspect()?;\n} catch (e) if e.message().contains(\"services not found in compose config\") => {\n    // resync mise services list with compose file and retry\n}","preventionTips":["Regenerate the mise services list whenever the compose file changes","Run `docker compose config --services` as a preflight","Point `files` at the correct compose file"],"tags":["docker-compose","service-lookup","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}