blob: 1e928c7d0e18be7e89ff1d21034c329e2b201e8d [file] [log] [blame]
Akronc71176d2022-03-14 11:15:07 +01001use Mojo::File 'path';
2use Mojo::ByteStream 'b';
3my $api = 'http://10.0.10.51:9000/api/';
4{
5 Search => {
6 engine => 'Kalamar::API'
7 },
8 'Kalamar-Auth' => {
9 client_id => b(path('.client_id')->slurp)->trim,
10 client_secret => b(path('.client_secret')->slurp)->trim,
11 oauth2 => 1,
12 experimental_client_registration => 1
13 },
14 Kalamar => {
15 api_path => $api,
16 secure_cookie => 1,
17 https_only => 1,
18 plugins => ['Auth', 'Piwik','Plugins'],
19 experimental_proxy => 1,
20 proxy_inactivity_timeout => 120,
21 proxy_connect_timeout => 120,
22 Piwik => {
23 ping_requests => 1,
24 ping_site_id => 13
25 },
26 navi_ext => [
27 {
28 "title" => "corpora",
29 "id" => "corpus"
30 },
31 {
32 "title" => "Privacy",
33 "id" => "privacy"
34 },
35 ],
36 },
37 CSP => {
38 'frame-src' => 'self',
39 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
40 },
41 'Kalamar-Plugins' => {
42 default_plugins => 'default.plugins.json'
43 },
44 Piwik => {
45 url => 'https://stats.ids-mannheim.de',
46 token_auth => '8515ea786127a63a2974de25a0808b00',
47 site_id => 8,
48 embed => 1
49 },
50 hypnotoad => {
51 listen => ['http://*:4348'],
52 workers => 5,
53 inactivity_timeout => 120,
54 proxy => 1
55 },
56 MailException => {
57 from => join('@', 'diewald', 'ids-mannheim.de'),
58 to => join('@', 'diewald', 'ids-mannheim.de'),
59 subject => '[KorAP] Kalamar crashed'
60 },
61 Localize => {
62 dict => {
63 de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
64 en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
65 en_Nav_privacy => 'Privacy',
66 de_Nav_privacy => 'Datenschutz',
67 de_Nav_corpora => 'Korpora',
68 en_Nav_corpora => 'Corpora',
69 en_howToCite => 'Citation Help',
70 de_howToCite => 'Zitierhilfe',
71 en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data',
72 de_recentCorpusPub => 'Neuere Publikationen zu DeReKo als linguistische Forschungsdatengrundlage',
Akronbd2b9572023-09-04 11:26:19 +020073 en_recentToolPub => 'Recent publications to refer to KorAP as a research tool',
Akronc71176d2022-03-14 11:15:07 +010074 de_recentToolPub => 'Neuere Publikationen zu KorAP als Forschungswerkzeug',
75 }
76 },
77 'TagHelpers-ContentBlock' => {
78 footer => [
79 {
80 inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>',
81 position => 70
82 },
83 {
84 inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq" })->fragment("howToCite") %>',
85 position => 75
86 },
87 {
88 inline => '<%= link_to loc("privacy") => "doc/privacy" %>',
89 position => 90
90 },
91 {
92 inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>',
93 position => 80
94 },
95 ],
96 faq => [
97 {
98 position => 50,
99 inline => <<'HOWTOCITE'
100<section>
101 <h3 id="howToCite"><%= loc 'howToCite' %></h3>
102%= include 'custom/partial/citation'
103</section>
104HOWTOCITE
105 }
106 ],
107 loginInfo => [
108 {
109 inline => '<p><%== loc "loginExplanation" %></p>',
110 position => 50
111 }#,
112# {
113# 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>',
114# position => 100
115# }
116 ]
117 },
118
119 # See Mojolicious::Plugin::CHI
120 CHI => {
121 default => {
122 driver => 'FastMmap',
123 root_dir => app->home . '/cache/data',
124 cache_size => '500m',
125 max_size => '500m'
126 },
127 user => {
128 l1_cache => {
129 driver => 'FastMmap',
130 root_dir => app->home . '/cache/usermap',
131 cache_size => '50m',
132 max_size => '50m'
133 },
134 driver => 'File',
135 root_dir => app->home . '/cache/userfile',
136 max_key_length => 64,
137 max_size => '500m'
138 }
139 }
140};