blob: f5fb84d3eb3a73734fac634381f4a7fb41247f9a [file] [log] [blame]
Akronc71176d2022-03-14 11:15:07 +01001use Mojo::ByteStream 'b';
Akron85559f02023-09-04 11:42:45 +02002
Marc Kupietza1675022026-01-19 18:52:47 +01003# $main::ENV{MOJO_MAX_LINE_SIZE} = 65536;
Akron85559f02023-09-04 11:42:45 +02004
Akronc71176d2022-03-14 11:15:07 +01005{
Akronc71176d2022-03-14 11:15:07 +01006 'Kalamar-Auth' => {
Marc Kupietza1675022026-01-19 18:52:47 +01007 # client_id => b($app->home->child('.client_id')->slurp)->trim,
8 # client_secret => b($app->home->child('.client_secret')->slurp)->trim,
9 # Optimized for docker usage:
10 client_file => '/kalamar/super_client_info',
Akronc71176d2022-03-14 11:15:07 +010011 oauth2 => 1,
12 experimental_client_registration => 1
13 },
14 Kalamar => {
Marc Kupietza1675022026-01-19 18:52:47 +010015 # Removed for docker compliance
16 # api_path => 'http://10.0.10.51:9000/api/',
Marc Kupietz4f28dc42026-07-21 19:39:29 +020017 # Render Markdown doc pages (*.html.md) with headings at their literal
18 # level, so "##" in the corpus release log is an <h2> (matches the rest
19 # of the doc pages) rather than being pushed down by the default offset.
20 Markdown => { heading_offset => 0 },
Akron4a118742023-09-04 11:41:46 +020021 log_path => $app->home . '/log',
Akronc71176d2022-03-14 11:15:07 +010022 secure_cookie => 1,
23 https_only => 1,
24 plugins => ['Auth', 'Piwik','Plugins'],
25 experimental_proxy => 1,
26 proxy_inactivity_timeout => 120,
27 proxy_connect_timeout => 120,
Akron8ceba022024-04-18 09:18:53 +020028 openapi => 'openapi',
Akronc71176d2022-03-14 11:15:07 +010029 Piwik => {
30 ping_requests => 1,
31 ping_site_id => 13
32 },
Marc Kupietz4d7cace2026-09-10 16:36:05 +020033 # The corpus section and the order of the documentation menu come from
34 # this instance's templates/doc/navigation.json, which is mounted over
35 # the one Kalamar ships. Entries listed here are appended after it.
Akronc71176d2022-03-14 11:15:07 +010036 navi_ext => [
37 {
Akronc71176d2022-03-14 11:15:07 +010038 "title" => "Privacy",
39 "id" => "privacy"
40 },
Akron8dbf9c62024-03-20 17:24:15 +010041 {
42 "title" => "News",
43 "id" => "news"
44 },
Marc Kupietz442e0bd2026-08-04 12:51:39 +020045 {
46 "title" => "citation",
47 "id" => "citation"
48 },
Akronc71176d2022-03-14 11:15:07 +010049 ],
Marc Kupietza1675022026-01-19 18:52:47 +010050 defaults => {
51 alignment => 'center' # or 'right' or 'center'
52 },
Akronc71176d2022-03-14 11:15:07 +010053 },
54 CSP => {
55 'frame-src' => 'self',
56 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
57 },
58 'Kalamar-Plugins' => {
Marc Kupietza1675022026-01-19 18:52:47 +010059 # Optimized for docker usage:
60 default_plugins => '/kalamar/default.plugins.json'
Akronc71176d2022-03-14 11:15:07 +010061 },
62 Piwik => {
63 url => 'https://stats.ids-mannheim.de',
64 token_auth => '8515ea786127a63a2974de25a0808b00',
65 site_id => 8,
66 embed => 1
67 },
68 hypnotoad => {
69 listen => ['http://*:4348'],
70 workers => 5,
71 inactivity_timeout => 120,
72 proxy => 1
73 },
Akronc71176d2022-03-14 11:15:07 +010074 Localize => {
Marc Kupietza1675022026-01-19 18:52:47 +010075 override => 1,
Akronc71176d2022-03-14 11:15:07 +010076 dict => {
77 de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
78 en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
79 en_Nav_privacy => 'Privacy',
80 de_Nav_privacy => 'Datenschutz',
81 de_Nav_corpora => 'Korpora',
82 en_Nav_corpora => 'Corpora',
Marc Kupietz4d7cace2026-09-10 16:36:05 +020083 de_Nav_corpus => 'Korpusgrundlage',
84 en_Nav_corpus => 'Corpus basis',
85 en_Nav_composition => 'Composition',
86 de_Nav_composition => 'Zusammensetzung',
87 en_Nav_useful_subcorpora => 'Useful subcorpora',
88 de_Nav_useful_subcorpora => 'Nützliche Subkorpora',
89 en_Nav_named_vc => 'Named VC',
90 de_Nav_named_vc => 'Benamte VC',
Akronc71176d2022-03-14 11:15:07 +010091 en_howToCite => 'Citation Help',
92 de_howToCite => 'Zitierhilfe',
Marc Kupietz442e0bd2026-08-04 12:51:39 +020093 en_Nav_citation => 'References / Citation Help',
94 de_Nav_citation => 'Referenzen / Zitierhilfe',
95 en_corpusPub => 'DeReKo',
96 de_corpusPub => 'DeReKo',
Marc Kupietz152dfc92025-04-11 10:02:27 +020097 de_usefulvcs => 'Nützliche virtuelle Sub-Korpora',
98 en_usefulvcs => 'Useful virtual sub-corpora',
99 de_currentdb => 'Aktuelle Datengrundlage: virtuelles Korpus <%= t code => stash("vc") %>',
100 en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>',
101 de_compositionbysource => 'Zusammensetzung nach Quelle',
102 en_compositionbysource => 'Composition by source',
Marc Kupietza1675022026-01-19 18:52:47 +0100103 #de_Title_composition => 'Korpus-Zusammensetzung',
104 #en_Title_composition => 'Corpus Composition',
Marc Kupietz4f28dc42026-07-21 19:39:29 +0200105 en_Nav_releases => 'Release Log',
Marc Kupietz2bd89b32026-08-03 17:39:34 +0200106 de_Nav_releases => 'Korpus-Releases',
Akronc71176d2022-03-14 11:15:07 +0100107 }
108 },
109 'TagHelpers-ContentBlock' => {
110 footer => [
111 {
112 inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>',
113 position => 70
114 },
115 {
Marc Kupietza1675022026-01-19 18:52:47 +0100116 inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>',
117 position => 72
118 },
119 {
Marc Kupietz442e0bd2026-08-04 12:51:39 +0200120 inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "citation", scope => undef }) %>',
Akronc71176d2022-03-14 11:15:07 +0100121 position => 75
122 },
123 {
Akrondc1b9bb2025-07-21 14:34:05 +0200124 inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy", scope => undef }) %>',
Akronc71176d2022-03-14 11:15:07 +0100125 position => 90
126 },
127 {
128 inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>',
129 position => 80
130 },
131 ],
132 faq => [
133 {
134 position => 50,
135 inline => <<'HOWTOCITE'
136<section>
137 <h3 id="howToCite"><%= loc 'howToCite' %></h3>
Marc Kupietz442e0bd2026-08-04 12:51:39 +0200138 <p><%= link_to loc('howToCite') => url_for(doc => { page => "citation", scope => undef })->query({ embedded => "true" }) %></p>
Akronc71176d2022-03-14 11:15:07 +0100139</section>
140HOWTOCITE
141 }
142 ],
143 loginInfo => [
144 {
145 inline => '<p><%== loc "loginExplanation" %></p>',
146 position => 50
147 }#,
148# {
149# 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>',
150# position => 100
151# }
Akron743c2d62025-03-05 14:37:59 +0100152 ],
153 headerButtonGroup => [
154 {
Akrondc1b9bb2025-07-21 14:34:05 +0200155 inline => '<h3 class="nav-link"><%= link_to loc("news") => url_for(doc => {page => "news", scope => undef }) %></h3>',
Akron743c2d62025-03-05 14:37:59 +0100156 position => 30
157 }
Akronc71176d2022-03-14 11:15:07 +0100158 ]
159 },
Akronc71176d2022-03-14 11:15:07 +0100160 # See Mojolicious::Plugin::CHI
Marc Kupietza1675022026-01-19 18:52:47 +0100161 # Could be optimized to use the data folder in docker scenarios:
162# CHI => {
163# default => {
164# driver => 'FastMmap',
165# root_dir => app->home . '/cache/data',
166# cache_size => '500m',
167# max_size => '500m'
168# },
169# user => {
170# l1_cache => {
171# driver => 'FastMmap',
172# root_dir => app->home . '/cache/usermap',
173# cache_size => '50m',
174# max_size => '50m'
175# },
176# driver => 'File',
177# root_dir => app->home . '/cache/userfile',
178# max_key_length => 64,
179# max_size => '500m'
180# }
181# }
Akronc71176d2022-03-14 11:15:07 +0100182};