This repository was archived by the owner on Nov 27, 2023. It is now read-only.
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Possibility to mark ECS containers as non essential #2211
Open
Description
Description
Have the possibility to mark ECS containers as non essential
Currently all containers are marked as essential: https://github.com/docker/compose-cli/blob/79770d5803d1b475409aad187b11a2b63d79a037/ecs/convert.go#L122
Use case
I have a container that initialises (create, seed...) the database then exit.
It works beautifully in localhost context (*), I would like the same behaviour when deployed to ECS
Unfortunately since all containers are marked as essential, ECS restarts the container in an infinite loop caused by "Essential container in task exited"
Proposed solution
Map restart: no
to Essential: false
in ECS ? see aws/amazon-ecs-cli#62 (comment)
Related issues
- How can we set sidecars for AWS ECS as essential: true #2101
- Add ability to set "essential" field on containers aws/amazon-ecs-cli#342
- Support ECS specific fields that are not supported in compose aws/amazon-ecs-cli#267 (comment)
(*)
services:
front:
...
back:
...
depends_on:
database-init:
condition: service_completed_successfully
database-init:
...
command: ['npm', 'run', 'db:init']
depends_on:
database:
condition: service_healthy
database:
...
Metadata
Metadata
Assignees
Labels
No labels