Skip to content

Some containers could stop faster #552

@heyyo-droid

Description

@heyyo-droid

I noticed some containers are stopping after around 10.5 seconds like cron and adminer(maybe other).
10 seconds is the maximal time docker is waiting before stopping the container if unresponsive.

It looks like those containers don't receive SIGTERMs.

Adding init: true to each container fixed it for me:

crond_mfa:
    image: wodby/drupal-php:$PHP_TAG
    container_name: "${PROJECT_NAME}_crond"
    init: true
    environment:
      CRONTAB: "0 * * * * drush -r /var/www/html/web cron"
    command: sudo -E crond -f -d 0

https://docs.docker.com/compose/compose-file/compose-file-v2/#init

What do you think of adding it ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions