Skip to content

Conversation

@guptapratykshh
Copy link
Contributor

@guptapratykshh guptapratykshh commented Jan 11, 2026

Description
this solves docker startup race conditions by adding a database health check and setting HOME=/tmp for handling permissions.

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

@guptapratykshh guptapratykshh force-pushed the fix/docker-startup-race-condition branch 2 times, most recently from dc95d67 to 91d0576 Compare January 11, 2026 18:10
@guptapratykshh guptapratykshh changed the title Fix race condition in Docker startup and enforce LF for shell scripts Fix race condition in Docker startup Jan 11, 2026
networks:
- augur
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${AUGUR_DB_USER:-augur} -d augur"]
Copy link
Contributor

Choose a reason for hiding this comment

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

is there an environment variable that allows the value of the database augur uses to be configured? if so we should use that for the -d argument

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the one have added there also- AUGUR_DB_NAME:-augur

Comment on lines 89 to 91
- redis
- augur-keyman
- rabbitmq
Copy link
Contributor

Choose a reason for hiding this comment

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

I think one of the other PRs for this also had changes to these lines to specifiy that they could start as long as the DB was up (before it becomes healthy).

is that the default behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, service_started is default behavior when no condition is specified. I have updated docker-compose.yml
to explicitly state condition: service_started for Redis, Keyman, and RabbitMQ to avoid any ambiguity, while keeping the strict service_healthy check for the database to prevent race condition.

@guptapratykshh guptapratykshh force-pushed the fix/docker-startup-race-condition branch from 91d0576 to 06a58a2 Compare January 12, 2026 04:11
@MoralCode MoralCode added the redundant PR is submitted in parallel with another mutually exclusive PR label Jan 19, 2026
@MoralCode
Copy link
Contributor

Superseded by #3613

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

redundant PR is submitted in parallel with another mutually exclusive PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Augur db somehow gets patially intialized

2 participants