blob: 3c8cc68475d2722e12baefb01082a4f61ca81ca1 [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 {
32 "title" => "corpora",
33 "id" => "corpus"
34 },
35 {
36 "title" => "Privacy",
37 "id" => "privacy"
38 },
Akron8dbf9c62024-03-20 17:24:15 +010039 {
40 "title" => "News",
41 "id" => "news"
42 },
Akronc71176d2022-03-14 11:15:07 +010043 ],
44 },
45 CSP => {
46 'frame-src' => 'self',
47 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
48 },
49 'Kalamar-Plugins' => {
50 default_plugins => 'default.plugins.json'
51 },
52 Piwik => {
53 url => 'https://stats.ids-mannheim.de',
54 token_auth => '8515ea786127a63a2974de25a0808b00',
55 site_id => 8,
56 embed => 1
57 },
58 hypnotoad => {
59 listen => ['http://*:4348'],
60 workers => 5,
61 inactivity_timeout => 120,
62 proxy => 1
63 },
64 MailException => {
65 from => join('@', 'diewald', 'ids-mannheim.de'),
66 to => join('@', 'diewald', 'ids-mannheim.de'),
67 subject => '[KorAP] Kalamar crashed'
68 },
69 Localize => {
70 dict => {
71 de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
72 en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
73 en_Nav_privacy => 'Privacy',
74 de_Nav_privacy => 'Datenschutz',
75 de_Nav_corpora => 'Korpora',
76 en_Nav_corpora => 'Corpora',
77 en_howToCite => 'Citation Help',
78 de_howToCite => 'Zitierhilfe',
79 en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data',
80 de_recentCorpusPub => 'Neuere Publikationen zu DeReKo als linguistische Forschungsdatengrundlage',
Akronbd2b9572023-09-04 11:26:19 +020081 en_recentToolPub => 'Recent publications to refer to KorAP as a research tool',
Akronc71176d2022-03-14 11:15:07 +010082 de_recentToolPub => 'Neuere Publikationen zu KorAP als Forschungswerkzeug',
Marc Kupietz152dfc92025-04-11 10:02:27 +020083 de_usefulvcs => 'Nützliche virtuelle Sub-Korpora',
84 en_usefulvcs => 'Useful virtual sub-corpora',
85 de_currentdb => 'Aktuelle Datengrundlage: virtuelles Korpus <%= t code => stash("vc") %>',
86 en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>',
87 de_compositionbysource => 'Zusammensetzung nach Quelle',
88 en_compositionbysource => 'Composition by source',
Akronc71176d2022-03-14 11:15:07 +010089 }
90 },
91 'TagHelpers-ContentBlock' => {
92 footer => [
93 {
94 inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>',
95 position => 70
96 },
97 {
Akronc71176d2022-03-14 11:15:07 +010098 inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq" })->fragment("howToCite") %>',
99 position => 75
100 },
101 {
Akron5b7e0c52024-04-12 12:03:09 +0200102 inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy" }) %>',
Akronc71176d2022-03-14 11:15:07 +0100103 position => 90
104 },
105 {
106 inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>',
107 position => 80
108 },
109 ],
110 faq => [
111 {
112 position => 50,
113 inline => <<'HOWTOCITE'
114<section>
115 <h3 id="howToCite"><%= loc 'howToCite' %></h3>
116%= include 'custom/partial/citation'
117</section>
118HOWTOCITE
119 }
120 ],
121 loginInfo => [
122 {
123 inline => '<p><%== loc "loginExplanation" %></p>',
124 position => 50
125 }#,
126# {
127# 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>',
128# position => 100
129# }
Akron743c2d62025-03-05 14:37:59 +0100130 ],
131 headerButtonGroup => [
132 {
133 inline => '<h3 class="nav-link"><%= link_to loc("news") => url_for(doc => {page => "news" }) %></h3>',
134 position => 30
135 }
Akronc71176d2022-03-14 11:15:07 +0100136 ]
137 },
138
139 # See Mojolicious::Plugin::CHI
140 CHI => {
141 default => {
142 driver => 'FastMmap',
143 root_dir => app->home . '/cache/data',
144 cache_size => '500m',
145 max_size => '500m'
146 },
147 user => {
148 l1_cache => {
149 driver => 'FastMmap',
150 root_dir => app->home . '/cache/usermap',
151 cache_size => '50m',
152 max_size => '50m'
153 },
154 driver => 'File',
155 root_dir => app->home . '/cache/userfile',
156 max_key_length => 64,
157 max_size => '500m'
158 }
159 }
160};