Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create indexes in MongoDB at startup only if env variable (default: true) #31

Merged

Conversation

GorgiAstro
Copy link

@GorgiAstro GorgiAstro commented Oct 16, 2024

Related Issue(s):

Description:

Create indexes in MongoDB at startup only if environment variable MONGO_CREATE_INDEXES is set to "true" (default when the env variable is not set: "true")

PR Checklist:

  • [👍] Code is formatted and linted (run pre-commit run --all-files)
  • [ 👎] Tests pass (run make test) : see below
  • [N/A] Documentation has been updated to reflect changes, if applicable
  • [👍] Changes are added to the changelog

The make test doesn't pass, first because the test makefile is still using docker compose v1 syntax (docker-compose), so it returns a command not found error. I opened an issue for that: #30

Even after changing docker-compose to docker compose, the tests don't run successfully, see log below. As this PR only introduces a minor change, I guess this issue is rather due to the compose v1->v2 migration.

wait-for-it-es.sh: waiting 45 seconds for mongo:27017
wait-for-it-es.sh: timeout occurred after waiting 45 seconds for mongo:27017
make: [Makefile:51: test] Error 124 (ignored)
docker compose down

Copy link
Contributor

@jonhealy1 jonhealy1 left a comment

Choose a reason for hiding this comment

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

Looks good. Can you add something to the readme that explains this? Thank you.

@jonhealy1 jonhealy1 requested a review from pedro-cf October 16, 2024 16:57
@GorgiAstro
Copy link
Author

Looks good. Can you add something to the readme that explains this? Thank you.

Done

Copy link
Contributor

@jonhealy1 jonhealy1 left a comment

Choose a reason for hiding this comment

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

Nice work. Thank you!

@jonhealy1 jonhealy1 merged commit ce94c09 into Healy-Hyperspatial:main Oct 19, 2024
5 checks passed
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.

2 participants