Skip to content

Conversation

@froozeify
Copy link
Member

@froozeify froozeify commented Jan 8, 2026

This solves race conditions in Docker environments where the database container may still be initializing.
Often occurring on the first docker startup (mysql will in that case create the DB, user etc).

Docker healthcheck-based depends_on not needed anymore

The depends_on: condition: service_healthy approach only works with docker compose. This application-level wait works in any orchestration environment (Kubernetes, Swarm, Podman, manual docker run).

Once merged, the healthcheck configuration in docker-compose.yml can now be safely removed #244, #250.

This should also closes #190

@froozeify froozeify requested a review from cedric-anne January 8, 2026 13:06
Copy link
Member

@cedric-anne cedric-anne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GLPI_DB_HOST, GLPI_DB_USER, GLPI_DB_PASSWORD and GLPI_DB_PORT are not strictly mandatory. Indeed, our image can be used without them, for instance with GLPI_SKIP_AUTOINSTALL/GLPI_SKIP_AUTOUPDATE set to true.

By the way, we could force GLPI_SKIP_AUTOINSTALL/GLPI_SKIP_AUTOUPDATE to true when the GLPI_DB_* are not defined or empty.

@froozeify froozeify requested a review from cedric-anne January 13, 2026 08:53
@cedric-anne cedric-anne merged commit 9e782e2 into main Jan 13, 2026
3 checks passed
@cedric-anne cedric-anne deleted the wait-for-db-to-be-ready branch January 13, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Completely broken

3 participants