blob: 36890b0e6e75e4aa466eefe5c49b3373c065e364 [file] [log] [blame]
Akronc71176d2022-03-14 11:15:07 +01001use Mojo::ByteStream 'b';
Akron85559f02023-09-04 11:42:45 +02002
3$main::ENV{MOJO_MAX_LINE_SIZE} = 65536;
4
Akronc71176d2022-03-14 11:15:07 +01005my $api = 'http://10.0.10.51:9000/api/';
6{
7 Search => {
8 engine => 'Kalamar::API'
9 },
10 'Kalamar-Auth' => {
Akron2e0811c2023-11-03 16:19:00 +010011 client_id => b($app->home->child('.client_id')->slurp)->trim,
12 client_secret => b($app->home->child('.client_secret')->slurp)->trim,
Akronc71176d2022-03-14 11:15:07 +010013 oauth2 => 1,
14 experimental_client_registration => 1
15 },
16 Kalamar => {
17 api_path => $api,
Akron4a118742023-09-04 11:41:46 +020018 log_path => $app->home . '/log',
Akronc71176d2022-03-14 11:15:07 +010019 secure_cookie => 1,
20 https_only => 1,
21 plugins => ['Auth', 'Piwik','Plugins'],
22 experimental_proxy => 1,
23 proxy_inactivity_timeout => 120,
24 proxy_connect_timeout => 120,
Akron8ceba022024-04-18 09:18:53 +020025 openapi => 'openapi',
Akronc71176d2022-03-14 11:15:07 +010026 Piwik => {
27 ping_requests => 1,
28 ping_site_id => 13
29 },
30 navi_ext => [
31 {
Akron56644052026-01-19 15:27:48 +010032 "title" => "corpus",
33 "id" => "corpus",
34 "class" => "folded",
35 "items" => [
36 {
37 "title" => "composition",
38 "id" => "composition"
39 },
40 {
41 "title" => "useful_subcorpora",
42 "id" => "useful_subcorpora"
43 },
44 {
45 "title" => "named_vc",
46 "id" => "named_vc"
47 }
48 ]
Akronc71176d2022-03-14 11:15:07 +010049 },
50 {
51 "title" => "Privacy",
52 "id" => "privacy"
53 },
Akron8dbf9c62024-03-20 17:24:15 +010054 {
55 "title" => "News",
56 "id" => "news"
57 },
Akronc71176d2022-03-14 11:15:07 +010058 ],
59 },
60 CSP => {
61 'frame-src' => 'self',
62 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
63 },
64 'Kalamar-Plugins' => {
65 default_plugins => 'default.plugins.json'
66 },
67 Piwik => {
68 url => 'https://stats.ids-mannheim.de',
69 token_auth => '8515ea786127a63a2974de25a0808b00',
70 site_id => 8,
71 embed => 1
72 },
73 hypnotoad => {
74 listen => ['http://*:4348'],
75 workers => 5,
76 inactivity_timeout => 120,
77 proxy => 1
78 },
79 MailException => {
80 from => join('@', 'diewald', 'ids-mannheim.de'),
81 to => join('@', 'diewald', 'ids-mannheim.de'),
82 subject => '[KorAP] Kalamar crashed'
83 },
84 Localize => {
85 dict => {
86 de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
87 en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
88 en_Nav_privacy => 'Privacy',
89 de_Nav_privacy => 'Datenschutz',
90 de_Nav_corpora => 'Korpora',
91 en_Nav_corpora => 'Corpora',
92 en_howToCite => 'Citation Help',
93 de_howToCite => 'Zitierhilfe',
94 en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data',
95 de_recentCorpusPub => 'Neuere Publikationen zu DeReKo als linguistische Forschungsdatengrundlage',
Akronbd2b9572023-09-04 11:26:19 +020096 en_recentToolPub => 'Recent publications to refer to KorAP as a research tool',
Akronc71176d2022-03-14 11:15:07 +010097 de_recentToolPub => 'Neuere Publikationen zu KorAP als Forschungswerkzeug',
Marc Kupietz152dfc92025-04-11 10:02:27 +020098 de_usefulvcs => 'Nützliche virtuelle Sub-Korpora',
99 en_usefulvcs => 'Useful virtual sub-corpora',
100 de_currentdb => 'Aktuelle Datengrundlage: virtuelles Korpus <%= t code => stash("vc") %>',
101 en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>',
102 de_compositionbysource => 'Zusammensetzung nach Quelle',
103 en_compositionbysource => 'Composition by source',
Akron56644052026-01-19 15:27:48 +0100104 de_Title_composition => 'Korpus-Zusammensetzung',
105 en_Title_composition => 'Corpus Composition',
106 en_Nav_composition => 'Composition',
107 de_Nav_composition => 'Zusammensetzung',
108 en_Nav_useful_subcorpora => 'Useful subcorpora',
109 de_Nav_useful_subcorpora => 'Nützliche Subkorpora',
110 en_Nav_named_vc => 'Named VC',
111 de_Nav_named_vc => 'Benamte VC',
Akronc71176d2022-03-14 11:15:07 +0100112 }
113 },
114 'TagHelpers-ContentBlock' => {
115 footer => [
116 {
117 inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>',
118 position => 70
119 },
120 {
Akrondc1b9bb2025-07-21 14:34:05 +0200121 inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq", scope => undef })->fragment("howToCite") %>',
Akronc71176d2022-03-14 11:15:07 +0100122 position => 75
123 },
124 {
Akrondc1b9bb2025-07-21 14:34:05 +0200125 inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy", scope => undef }) %>',
Akronc71176d2022-03-14 11:15:07 +0100126 position => 90
127 },
128 {
129 inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>',
130 position => 80
131 },
132 ],
133 faq => [
134 {
135 position => 50,
136 inline => <<'HOWTOCITE'
137<section>
138 <h3 id="howToCite"><%= loc 'howToCite' %></h3>
139%= include 'custom/partial/citation'
140</section>
141HOWTOCITE
142 }
143 ],
144 loginInfo => [
145 {
146 inline => '<p><%== loc "loginExplanation" %></p>',
147 position => 50
148 }#,
149# {
150# inline => '<p class="announcement"><time datetime="2018-05-24">24.05.2018</time> Um weitere Anwendungen für die Nutzung von DeReKo anbieten zu können, haben wir die <%= link_to "Nutzungsvereinbarung", "https://www.ids-mannheim.de/cosmas2/projekt/registrierung/Nutzungsvereinbarung.html" %> angepasst!</p>',
151# position => 100
152# }
Akron743c2d62025-03-05 14:37:59 +0100153 ],
154 headerButtonGroup => [
155 {
Akrondc1b9bb2025-07-21 14:34:05 +0200156 inline => '<h3 class="nav-link"><%= link_to loc("news") => url_for(doc => {page => "news", scope => undef }) %></h3>',
Akron743c2d62025-03-05 14:37:59 +0100157 position => 30
158 }
Akronc71176d2022-03-14 11:15:07 +0100159 ]
160 },
161
162 # See Mojolicious::Plugin::CHI
163 CHI => {
164 default => {
165 driver => 'FastMmap',
166 root_dir => app->home . '/cache/data',
167 cache_size => '500m',
168 max_size => '500m'
169 },
170 user => {
171 l1_cache => {
172 driver => 'FastMmap',
173 root_dir => app->home . '/cache/usermap',
174 cache_size => '50m',
175 max_size => '50m'
176 },
177 driver => 'File',
178 root_dir => app->home . '/cache/userfile',
179 max_key_length => 64,
180 max_size => '500m'
181 }
182 }
183};