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