compose icon indicating copy to clipboard operation
compose copied to clipboard

Add compose up `--no-start-exited` option

Open pavetok opened this issue 5 months ago • 0 comments

Description

Problem

services:
  db:
    ...
  migration:
    depends_on:
      db:
        condition: service_healthy
    ...
  app:
    depends_on:
      migration:
        condition: service_completed_successfully
    ...

Migration container started every time docker compose up fired. Even though there are no changes at all. Ideally migration container started only when it created or recreated.

Possible interfaces

  1. Add new option --no-restart
  2. Add new option --no-start-exited
  3. Generalize existing option --no-start string where string = {{.State.Status}}
  4. ...

pavetok avatar Mar 08 '24 10:03 pavetok