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

How to add custom config such as schema.xml #9

Closed
dfurber opened this issue Oct 18, 2018 · 9 comments
Closed

How to add custom config such as schema.xml #9

dfurber opened this issue Oct 18, 2018 · 9 comments

Comments

@dfurber
Copy link
Contributor

dfurber commented Oct 18, 2018

The pre-build hook will copy /solr/schema.xml and /solr/solrconfig.xml into the solr container. But the README says nothing about this. I am glad to do this, but wonder along the way if we might also have a folder such as /solrconfig, and have it copy every file in that folder into the same folder. For other files like protwords.txt. My use case is running sunspot with Rails.

@josegonzalez
Copy link
Member

Sure! I don't know much about solr, so I'll leave the best practices up to you :)

@cwant
Copy link

cwant commented Dec 13, 2023

Just trying to follow along here ... where do you need to put the config so that it's put in the solr container?
I see from the commit it mentions ${TMPDIR}, but I'm not sure where that is on the system in which I run dokku solr:create ... (is it the current directory? or in /tmp ... actually, I've tried both and they don't seem to copy the config into the container).

@josegonzalez
Copy link
Member

Make a "solr" directory in your app and commit your config there. On the next deploy, we will extract the config and use that to configure solr.

@cwant
Copy link

cwant commented Dec 13, 2023

Thanks for this. Is there a trigger needed to make solr re-extract the config after deploy? (like a post-deploy hook on the app or something?)
My app does have a solr dir, but I'm not seeing the solr containter getting re-built, and the config doesn't change in the container.
For reference, my app is called training the solr service is called training-solr, and I have:

$ dokku solr:links training-solr
training

$ dokku solr:app-links training
training-solr

But after pushing the app with git, I have a new web container, but the solr container is still old, e.g.,

$ sudo docker ps
CONTAINER ID   IMAGE                       COMMAND                  CREATED         STATUS         PORTS      NAMES
3e95774559e5   dokku/training:latest       "docker/entrypoint.s…"   8 minutes ago   Up 8 minutes   3000/tcp   training.web.1
76aa824fd6e9   solr:9.3.0                  "docker-entrypoint.s…"   22 hours ago    Up 22 hours    8983/tcp   dokku.solr.training-solr

I appreciate any insight you have about this (and apologies for being so clueless here).

@josegonzalez
Copy link
Member

The config is moved into place but the container isn't restarted. Are you seeing that the config isn't in place?

@cwant
Copy link

cwant commented Dec 19, 2023

Thanks Jose, I don't see the config getting moved into place (I think I will nuke what I have so far and rebuild to make sure I haven't broken something while trying things out).

The specific app I'm trying to Dokku-ize is this one:

https://github.com/ElixirTeSS/TeSS/tree/master/solr/conf

I'm not sure if having a conf directory in the solr directory is causing the issue, or if it's something else.

The Dokku version I am using is 0.27.8 (from Ubuntu 22.04 LTS), so maybe that's the issue.

Cheers,
Chris

@josegonzalez
Copy link
Member

It needs to be directly in the solr directory, not in a conf subdirectory.

@cwant
Copy link

cwant commented Jan 9, 2024

Okay thanks. I will adapt here.
I'll just mention that a lot of projects use the solr/conf subdirectory:

https://github.com/samvera/hyku/tree/main/solr/conf
https://github.com/ualbertalib/jupiter/tree/master/solr/conf
https://github.com/ElixirTeSS/TeSS/tree/master/solr/conf

(Maybe this is a rails thing? Or a libraries thing?)

@josegonzalez
Copy link
Member

I don't know how those projects integrate with solr, but its almost certainly something custom since there isnt anything common about the other contents of the solr dir. Probably just project-specific.

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