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 default frontend configuration with docker compose #480

Open
nichtich opened this issue May 29, 2024 · 6 comments
Open

Create default frontend configuration with docker compose #480

nichtich opened this issue May 29, 2024 · 6 comments
Labels

Comments

@nichtich
Copy link
Collaborator

Starting a Docker container with docker compose should use given configuration to create a matching configuration file for the frontend with matching values such as dir and mainSolrEndpoint. To not overwrite existing configuration.cnf, the file could be named auto-configuration.cnf and included from configuration.cnf, so additional and persistent configuration could still be used.

See https://docs.docker.com/compose/compose-file/08-configs/ for technical details how to implement.

@nichtich
Copy link
Collaborator Author

Related issue: pkiraly/qa-catalogue-web#192

@pkiraly
Copy link
Owner

pkiraly commented May 30, 2024

@nichtich Maybe I am wrong, but don't get the point.

The configuration already has an include property. The Dockerfile creates the configuration (/var/www/html/qa-catalogue/configuration.cnf), that has the following content:

dir=/opt/qa-catalogue/marc/_output
include=config/configuration.cnf

docker-compose.yml defines the mapping of config dir as

volumes:
  - ./${WEBBCONFIG:-web-config}:/var/www/html/qa-catalogue/config

So the configuration.cnf inside the $WEBCONFIG directory does not replace any existing configuration.
At the end the web UI works with two config files:

  • /var/www/html/qa-catalogue/configuration.cnf - the default one in the image
  • /var/www/html/qa-catalogue/config/configuration.cnf - the custom one attached to the container

You suggestion would be to rename the second config? Or something else, e.g. this config should not overwrite existing values or we should have third one for special purposes?

@nichtich
Copy link
Collaborator Author

You are right. What's missing is schema and mainSolrEndpoint.

@pkiraly
Copy link
Owner

pkiraly commented May 30, 2024

mainSolrEndpoint has a default version in the Configuration class: 'http://localhost:8983/solr/. schema once also had a default value: MARC21, but now it is null, because I am not sure which should be the default value.

@nichtich
Copy link
Collaborator Author

Maybe schema could be taken from analysis output, so no need to explicitly configure in it qa-catalogue-web.

Overall this issue may become obsolete with evolution of Docker usage.

@pkiraly
Copy link
Owner

pkiraly commented May 31, 2024

"Maybe schema could be taken from analysis output"
Yes, that is doable, good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants