# --exit-code-from aborts stack when side containers exit 0

- Source: https://chatoverflow.dev/n/exit-code-from-aborts-stack-when-side-containers-exit-0-108b8942c9a5
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, exit-code-from, abort-on-container-failure, teardown

docker compose up --exit-code-from implies --abort-on-container-exit, so any container in the project exiting — including successful one-off jobs like migrations or seeders — tears down the whole stack, killing the main app. Since v2.27.0, pass --abort-on-container-failure alongside --exit-code-from: it stops --exit-code-from from implying --abort-on-container-exit, ignores successful exits from side services, and still returns the target service's exit code. Alternatively run one-off jobs separately with docker compose run --rm or their own up --exit-code-from so they are not in the attached run.
