Skip to content
Snippets Groups Projects
Verified Commit a10740f6 authored by Ingo Pfennigstorf's avatar Ingo Pfennigstorf :nail_care:
Browse files

[WIP] Dockerize the application

parent 3d4cf857
No related branches found
No related tags found
No related merge requests found
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
FROM python:3.8 as indexer
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN python3 csv2solr.py > docs.xml
FROM solr:8.7
EXPOSE 8983
COPY ./solr-zeug/ /tmp/solr/
USER root
RUN mkdir -p /var/solr/data/myth && \
cp /tmp/solr/solrconfig.xml /var/solr/data/myth/ && \
touch /var/solr/data/myth/core.properties && \
chown -R solr:solr /var/solr/data/myth/ && \
chmod -R 777 /var/solr/data/myth
USER solr
COPY --from=indexer /usr/src/app/docs.xml /usr/src/app/
RUN precreate-core myth && \
solr start && \
wait-for-solr.sh && \
sleep 20 && \
bin/post -c myth /usr/src/app/docs.xml
VOLUME /var/solr/data/myth
version: '3.2'
services:
solr:
build: .
ports:
- "8983:8983"
<?xml version="1.0" encoding="UTF-8"?>
<schema name="strata" version="1.6">
<schema name="strata" version="1.6">
<!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml
or Solr won't start. _version_ and update log are required for SolrCloud
-->
<field name="_version_" type="long" indexed="true" stored="true"/>
<!-- points to the root document of a block of nested documents. Required for nested
document support, may be removed otherwise
-->
<field name="_root_" type="string" indexed="true" stored="false" docValues="false" />
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
<!-- hylem fields -->
<field name="text_nr" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
<!-- <field name="chron_nr" type="string" indexed="true" stored="true" required="false" multiValued="false"/>-->
<field name="source" type="text_de" indexed="true" stored="true" required="true" multiValued="false"/>
<field name="hspo" type="text_de" indexed="true" stored="true" required="true" multiValued="false"/>
<!-- types: hyleme, title, gap -->
<field name="line_info" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
<field name="hylem_type" type="string" indexed="true" stored="true" required="false" multiValued="false"/>
<field name="subject" type="text_de" indexed="true" stored="true" required="true" multiValued="true"/>
<field name="subject_determ_ref" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="subject_determ" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="predicate" type="text_de" indexed="true" stored="true" required="true" multiValued="false"/>
<field name="predicate_determ" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="object" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="object_determ" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="object_determ_ref" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="speach" type="boolean" indexed="true" stored="true" required="false" multiValued="false"/>
<uniqueKey>id</uniqueKey>
<!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml
or Solr won't start. _version_ and update log are required for SolrCloud
-->
<field name="_version_" type="long" indexed="true" stored="true"/>
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
<fieldType name="booleans" class="solr.BoolField" sortMissingLast="true" multiValued="true"/>
<!-- points to the root document of a block of nested documents. Required for nested
document support, may be removed otherwise
-->
<field name="_root_" type="string" indexed="true" stored="false" docValues="false"/>
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
<!-- hylem fields -->
<field name="text_nr" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
<!-- <field name="chron_nr" type="string" indexed="true" stored="true" required="false" multiValued="false"/>-->
<field name="source" type="text_de" indexed="true" stored="true" required="true" multiValued="false"/>
<field name="hspo" type="text_de" indexed="true" stored="true" required="true" multiValued="false"/>
<!-- types: hyleme, title, gap -->
<field name="line_info" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
<field name="hylem_type" type="string" indexed="true" stored="true" required="false" multiValued="false"/>
<field name="subject" type="text_de" indexed="true" stored="true" required="true" multiValued="true"/>
<field name="subject_determ_ref" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="subject_determ" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="predicate" type="text_de" indexed="true" stored="true" required="true" multiValued="false"/>
<field name="predicate_determ" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="object" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="object_determ" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="object_determ_ref" type="text_de" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="speach" type="boolean" indexed="true" stored="true" required="false" multiValued="false"/>
<uniqueKey>id</uniqueKey>
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
<fieldType name="booleans" class="solr.BoolField" sortMissingLast="true" multiValued="true"/>
<!-- TYPES -->
<fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
<fieldType name="pdates" class="solr.DatePointField" docValues="true" multiValued="true"/>
<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
<fieldType name="pdoubles" class="solr.DoublePointField" docValues="true" multiValued="true"/>
<fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>
<fieldType name="pfloats" class="solr.FloatPointField" docValues="true" multiValued="true"/>
<fieldType name="pint" class="solr.IntPointField" docValues="true"/>
<fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
<fieldType name="plong" class="solr.LongPointField" docValues="true"/>
<fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>
<fieldType name="point" class="solr.PointType" subFieldSuffix="_d" dimension="2"/>
<fieldType name="random" class="solr.RandomSortField" indexed="true"/>
<fieldType name="strings" class="solr.StrField" sortMissingLast="true" multiValued="true"/>
<!-- TYPES -->
<fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
<fieldType name="pdates" class="solr.DatePointField" docValues="true" multiValued="true"/>
<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
<fieldType name="pdoubles" class="solr.DoublePointField" docValues="true" multiValued="true"/>
<fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>
<fieldType name="pfloats" class="solr.FloatPointField" docValues="true" multiValued="true"/>
<fieldType name="pint" class="solr.IntPointField" docValues="true"/>
<fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
<fieldType name="plong" class="solr.LongPointField" docValues="true"/>
<fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>
<fieldType name="point" class="solr.PointType" subFieldSuffix="_d" dimension="2"/>
<fieldType name="random" class="solr.RandomSortField" indexed="true"/>
<fieldType name="strings" class="solr.StrField" sortMissingLast="true" multiValued="true"/>
<!-- nur index oder beides? -> ohne type automatisch beides -->
<fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StopFilterFactory" format="snowball" words="stopwords_de.txt" ignoreCase="true"/>
<filter class="solr.GermanNormalizationFilterFactory"/>
<filter class="solr.GermanLightStemFilterFactory"/>
</analyzer>
</fieldType>
<!-- nur index oder beides? -> ohne type automatisch beides -->
<fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StopFilterFactory" format="snowball" words="stopwords_de.txt" ignoreCase="true"/>
<filter class="solr.GermanNormalizationFilterFactory"/>
<filter class="solr.GermanLightStemFilterFactory"/>
</analyzer>
</fieldType>
<!-- <fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<Filter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_dt.txt" enablePositionIncrements="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_dt.txt" enablePositionIncrements="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.HyphenatedWordsFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
......@@ -77,10 +77,10 @@
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType> -->
<!-- <filter class="solr.SynonymFilterFactory" synonyms="s.txt" ignoreCase="true" expand="true"/> -->
</fieldType> -->
<!-- <filter class="solr.SynonymFilterFactory" synonyms="s.txt" ignoreCase="true" expand="true"/> -->
<!-- PathHierarchyTokenizerFactory ?
<!-- PathHierarchyTokenizerFactory ?
<fieldType name="descendent_path" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
......@@ -89,7 +89,7 @@
<tokenizer class="solr.KeywordTokenizerFactory" />
</analyzer>
</fieldType>-->
<!--
<!--
Example of using PathHierarchyTokenizerFactory at query time, so
queries for paths match documents at that path, or in ancestor paths
-->
......
......@@ -2,56 +2,52 @@
<config>
<luceneMatchVersion>7.6.0</luceneMatchVersion>
<schemaFactory class="ClassicIndexSchemaFactory"/>
<query>
<enableLazyFieldLoading>true</enableLazyFieldLoading>
<!-- This must be high, so that wildcard searches work reasonably. -->
<maxBooleanClauses>20000</maxBooleanClauses>
</query>
<!-- Common parameters for the custom search handlers -->
<initParams path="/search">
<lst name="invariants">
<str name="df">fulltext</str>
</lst>
<lst name="defaults">
<str name="defType">edismax</str>
<str name="omitHeader">false</str>
<str name="echoParams">all</str>
<str name="wt">json</str>
<str name="json.nl">flat</str>
<int name="timeAllowed">15000</int>
</lst>
</initParams>
<requestHandler name="/search" class="solr.SearchHandler">
</requestHandler>
<!-- This should never be used in the frontend, only for testing in the admin interface. -->
<requestHandler name="/select" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">all</str>
<str name="defType">edismax</str>
<str name="df">content</str>
<str name="facet">true</str>
<!-- <str name="facet.field">author_facet</str>
<str name="facet.field">recipient_facet</str>
<str name="facet.field">origin_place_facet</str>
<str name="facet.field">destination_place_facet</str> -->
<str name="hl.simple.pre"><![CDATA[<span class="highlight">]]></str>
<str name="hl.simple.post"><![CDATA[</span>]]></str>
</lst>
</requestHandler>
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
<!-- For the Analysis functionality in the admin interface. -->
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
<admin>
<defaultQuery>solr</defaultQuery>
</admin>
<luceneMatchVersion>7.6.0</luceneMatchVersion>
<schemaFactory class="ClassicIndexSchemaFactory"/>
<query>
<enableLazyFieldLoading>true</enableLazyFieldLoading>
<!-- This must be high, so that wildcard searches work reasonably. -->
<maxBooleanClauses>20000</maxBooleanClauses>
</query>
<!-- Common parameters for the custom search handlers -->
<initParams path="/search">
<lst name="invariants">
<str name="df">fulltext</str>
</lst>
<lst name="defaults">
<str name="defType">edismax</str>
<str name="omitHeader">false</str>
<str name="echoParams">all</str>
<str name="wt">json</str>
<str name="json.nl">flat</str>
<int name="timeAllowed">15000</int>
</lst>
</initParams>
<requestHandler name="/search" class="solr.SearchHandler">
</requestHandler>
<!-- This should never be used in the frontend, only for testing in the admin interface. -->
<requestHandler name="/select" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">all</str>
<str name="defType">edismax</str>
<str name="df">content</str>
<str name="facet">true</str>
<str name="hl.simple.pre"><![CDATA[<span class="highlight">]]></str>
<str name="hl.simple.post"><![CDATA[</span>]]></str>
</lst>
</requestHandler>
<requestHandler name="/update" class="solr.UpdateRequestHandler"/>
<!-- For the Analysis functionality in the admin interface. -->
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler"/>
<admin>
<defaultQuery>solr</defaultQuery>
</admin>
</config>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment