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

SOLR 8 entrypoints #472

Open
almunnings opened this issue May 18, 2022 · 2 comments
Open

SOLR 8 entrypoints #472

almunnings opened this issue May 18, 2022 · 2 comments

Comments

@almunnings
Copy link

As I understand it there is a race condition between mounting a volume over SOLR and lagoon/lando/pygmy which can be addressed by recreating the core ( #97 )

The recommended way for getting a SOLR-8 running via @tobybellwood was something similar to:

FROM uselagoon/solr-8-drupal
CMD solr-recreate drupal /solr-conf && solr-foreground

This works great on lagoon
But when working locally in a tool like lando, the command gets overridden to

/sbin/tini -- /lagoon/entrypoints.sh solr-foreground

This can be worked around by setting up the cmd again in the .lando.yml file as an override for the service, but it feels dirty writing this multiple times in a project.

Which got me thinking, what if its moved into an entrypoint?

FROM uselagoon/solr-8-drupal

USER root
RUN echo -e "#!/bin/bash\nsolr-recreate drupal /solr-conf" > /lagoon/entrypoints/90-solr.sh

USER solr
CMD ["solr-foreground"]

So the issue request is...

  • Would it be possible to bake in an entrypoint for solr-8 and solr-8-drupal that runs the recreate logic.
  • Is there any negatives to it?
  • Could it use an ENV inside the entrypoint for the core name?
@ocean
Copy link

ocean commented Sep 7, 2022

As a followup to this @tobybellwood we're using this approach for Solr 8 on our site (worked fine in testing for a few weeks, just deployed to production and seems to be going fine).

We have three Solr cores (one with 2 indexes), and I used the same approach as above, echo -ing the solr-recreate command for each core into /lagoon/entrypoints/90-solr-recreate.sh.

@tobybellwood
Copy link
Member

Ok, I'll try make some time to get this up, I trust you two!

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

No branches or pull requests

3 participants