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