Changes imported from DeReKo-KorAP-Release 2026-I on instance-main-docker
Change-Id: Ia1ffa2c6bfcf17cdea02febae91404cd76dda6f5
diff --git a/kalamar.ids-mannheim.conf b/kalamar.ids-mannheim.conf
index 36890b0..e61bfda 100644
--- a/kalamar.ids-mannheim.conf
+++ b/kalamar.ids-mannheim.conf
@@ -1,20 +1,19 @@
use Mojo::ByteStream 'b';
-$main::ENV{MOJO_MAX_LINE_SIZE} = 65536;
+# $main::ENV{MOJO_MAX_LINE_SIZE} = 65536;
-my $api = 'http://10.0.10.51:9000/api/';
{
- Search => {
- engine => 'Kalamar::API'
- },
'Kalamar-Auth' => {
- client_id => b($app->home->child('.client_id')->slurp)->trim,
- client_secret => b($app->home->child('.client_secret')->slurp)->trim,
+ # client_id => b($app->home->child('.client_id')->slurp)->trim,
+ # client_secret => b($app->home->child('.client_secret')->slurp)->trim,
+ # Optimized for docker usage:
+ client_file => '/kalamar/super_client_info',
oauth2 => 1,
experimental_client_registration => 1
},
Kalamar => {
- api_path => $api,
+ # Removed for docker compliance
+ # api_path => 'http://10.0.10.51:9000/api/',
log_path => $app->home . '/log',
secure_cookie => 1,
https_only => 1,
@@ -56,13 +55,17 @@
"id" => "news"
},
],
+ defaults => {
+ alignment => 'center' # or 'right' or 'center'
+ },
},
CSP => {
'frame-src' => 'self',
'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
},
'Kalamar-Plugins' => {
- default_plugins => 'default.plugins.json'
+ # Optimized for docker usage:
+ default_plugins => '/kalamar/default.plugins.json'
},
Piwik => {
url => 'https://stats.ids-mannheim.de',
@@ -76,12 +79,8 @@
inactivity_timeout => 120,
proxy => 1
},
- MailException => {
- from => join('@', 'diewald', 'ids-mannheim.de'),
- to => join('@', 'diewald', 'ids-mannheim.de'),
- subject => '[KorAP] Kalamar crashed'
- },
Localize => {
+ override => 1,
dict => {
de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
@@ -89,6 +88,8 @@
de_Nav_privacy => 'Datenschutz',
de_Nav_corpora => 'Korpora',
en_Nav_corpora => 'Corpora',
+ de_Nav_corpus => 'Korpus',
+ en_Nav_corpus => 'Corpus',
en_howToCite => 'Citation Help',
de_howToCite => 'Zitierhilfe',
en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data',
@@ -101,8 +102,8 @@
en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>',
de_compositionbysource => 'Zusammensetzung nach Quelle',
en_compositionbysource => 'Composition by source',
- de_Title_composition => 'Korpus-Zusammensetzung',
- en_Title_composition => 'Corpus Composition',
+ #de_Title_composition => 'Korpus-Zusammensetzung',
+ #en_Title_composition => 'Corpus Composition',
en_Nav_composition => 'Composition',
de_Nav_composition => 'Zusammensetzung',
en_Nav_useful_subcorpora => 'Useful subcorpora',
@@ -118,6 +119,10 @@
position => 70
},
{
+ inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>',
+ position => 72
+ },
+ {
inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq", scope => undef })->fragment("howToCite") %>',
position => 75
},
@@ -158,26 +163,26 @@
}
]
},
-
# See Mojolicious::Plugin::CHI
- CHI => {
- default => {
- driver => 'FastMmap',
- root_dir => app->home . '/cache/data',
- cache_size => '500m',
- max_size => '500m'
- },
- user => {
- l1_cache => {
- driver => 'FastMmap',
- root_dir => app->home . '/cache/usermap',
- cache_size => '50m',
- max_size => '50m'
- },
- driver => 'File',
- root_dir => app->home . '/cache/userfile',
- max_key_length => 64,
- max_size => '500m'
- }
- }
+ # Could be optimized to use the data folder in docker scenarios:
+# CHI => {
+# default => {
+# driver => 'FastMmap',
+# root_dir => app->home . '/cache/data',
+# cache_size => '500m',
+# max_size => '500m'
+# },
+# user => {
+# l1_cache => {
+# driver => 'FastMmap',
+# root_dir => app->home . '/cache/usermap',
+# cache_size => '50m',
+# max_size => '50m'
+# },
+# driver => 'File',
+# root_dir => app->home . '/cache/userfile',
+# max_key_length => 64,
+# max_size => '500m'
+# }
+# }
};
\ No newline at end of file