blob: ad876e759a068c0f400e8bd98b43037f574ac81f [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',
83 }
84 },
85 'TagHelpers-ContentBlock' => {
86 footer => [
87 {
88 inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>',
89 position => 70
90 },
91 {
Akron5b7e0c52024-04-12 12:03:09 +020092 inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>',
Akron8dbf9c62024-03-20 17:24:15 +010093 position => 72
94 },
95 {
Akronc71176d2022-03-14 11:15:07 +010096 inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq" })->fragment("howToCite") %>',
97 position => 75
98 },
99 {
Akron5b7e0c52024-04-12 12:03:09 +0200100 inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy" }) %>',
Akronc71176d2022-03-14 11:15:07 +0100101 position => 90
102 },
103 {
104 inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>',
105 position => 80
106 },
107 ],
108 faq => [
109 {
110 position => 50,
111 inline => <<'HOWTOCITE'
112<section>
113 <h3 id="howToCite"><%= loc 'howToCite' %></h3>
114%= include 'custom/partial/citation'
115</section>
116HOWTOCITE
117 }
118 ],
119 loginInfo => [
120 {
121 inline => '<p><%== loc "loginExplanation" %></p>',
122 position => 50
123 }#,
124# {
125# 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>',
126# position => 100
127# }
128 ]
129 },
130
131 # See Mojolicious::Plugin::CHI
132 CHI => {
133 default => {
134 driver => 'FastMmap',
135 root_dir => app->home . '/cache/data',
136 cache_size => '500m',
137 max_size => '500m'
138 },
139 user => {
140 l1_cache => {
141 driver => 'FastMmap',
142 root_dir => app->home . '/cache/usermap',
143 cache_size => '50m',
144 max_size => '50m'
145 },
146 driver => 'File',
147 root_dir => app->home . '/cache/userfile',
148 max_key_length => 64,
149 max_size => '500m'
150 }
151 }
152};