- docker-compose-plugin
- python3 (optional, for generating password hashes)
-
Start the solr service
docker compose up -d -
Configure dovecot to use solr for full text search (fts)
By default Apache Solr is set up with open access to all.
There's an sample basic auth configuration you can use to protect this instance.
-
Using
var_solr/data/security-sample.jsonas a basis activate authentication in Solr by creating thesecurity.jsonconfiguration file.cp var_solr/data/security-sample.json var_solr/data/security.json -
Generate auth credentials using the
solr-password-hasherscript in this repo../solr-passwd-hasher -
Take the last line of output from
solr-passwd-hasherand update the.authentication.credentials.dovecotvalue invar_solr/data/security.json.You can create additional user/pass pairs by extending the
credentialsJSON object invar_solr/data/security.json. -
Configure Dovecot to use basic auth by updating the
fts_solrURL.For example, where the connection without authentication is:
fts_solr = url=http://localhost:8983/solr/dovecot/with authentication this would be:
fts_solr = url=http://dovecot:password@localhost:8983/solr/dovecot/
You can manage a couple of parameters in a local .env file that will be used
by docker compose when starting up the container:
| Variable | Description |
|---|---|
| PORTS | IP & port mapping for docker (defaults to 8983:8983) |
| JAVA_MIN_MEMORY | Minimum heap size for the JVM (defaults to 512m) |
| JAVA_MAX_MEMORY | Maxiumum heap size for the JVM (defaults to 512m) |