jdx/mise · error · eyre::Report
services not found in compose config: {}
Error message
services not found in compose config: {} What it means
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.
Source
Thrown at src/system/compose.rs:471
fn inspect(&self) -> Result<ComposeInspection> {
let configured_services = self
.compose_output(&["config".to_string(), "--services".to_string()])?
.lines()
.filter(|line| !line.trim().is_empty())
.map(|line| line.trim().to_string())
.collect::<IndexSet<_>>();
let target_services = if self.services.is_empty() {
configured_services.clone()
} else {
let missing = self
.services
.iter()
.filter(|service| !configured_services.contains(*service))
.cloned()
.collect::<Vec<_>>();
if !missing.is_empty() {
bail!(
"services not found in compose config: {}",
missing.join(", ")
);
}
self.services.iter().cloned().collect()
};
let config_hashes = if self.state == ComposeState::Running {
parse_config_hashes(
&self.compose_output(&["config".to_string(), "--hash=*".to_string()])?,
)?
} else {
HashMap::new()
};
let mut containers = parse_ps(&self.compose_output(&[
"ps".to_string(),
"--all".to_string(),
"--format".to_string(),
"json".to_string(),View on GitHub (pinned to 9dcfcaa0dc)
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.
Example fix
# before [bootstrap.compose.web] project_dir = "/srv/web" services = ["webb", "api"] # after (docker compose config --services says: api, web) [bootstrap.compose.web] project_dir = "/srv/web" services = ["web", "api"]
Defensive patterns
Strategy: validation
Validate before calling
#!/usr/bin/env bash
# preflight before mise bootstrap compose apply
cd /srv/web
docker compose -f compose.yml -f compose.prod.yml config --services > /tmp/actual.txt
for s in web api; do
grep -qx "$s" /tmp/actual.txt || { echo "service '$s' not defined" >&2; exit 1; }
done Prevention
- 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.
When it happens
Trigger: `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.
Common situations: 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.
Related errors
- refusing unsafe change to bootstrap compose project '{}'; in
- bootstrap compose project '{name}' services cannot be combin
- container inspection returned an unexpected number of rows
- compose command failed with {status}
- legacy 'docker-compose' v1 is unsupported; install Docker Co
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/9866c0140e916fa1.
Report an issue: GitHub.