-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathconfig.yml.example
345 lines (312 loc) · 10.3 KB
/
config.yml.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
development: &default
secret_token: 'somethingsecret'
app_name: 'Check'
authorization_header: 'X-Check-Token'
checkdesk_base_url: 'http://localhost:3000'
checkdesk_base_url_private: 'http://localhost:3000'
checkdesk_client: 'http://localhost:3333'
app_url: 'http://localhost:3333'
elasticsearch_host: 'elasticsearch'
elasticsearch_port: 9200
elasticsearch_index:
elasticsearch_log: true
elasticsearch_sync: false
super_admin_name: 'Meedan'
# WARNING For production, don't use a wildcard: set the allowed domains explicitly as a regular expression, e.g.
# '(https?://.*\.?(meedan.com|meedan.org))'
allowed_origins: '.*'
# Alegre service URL
#
# OPTIONAL AND RECOMMENDED
# Use values below for local development
#
alegre_host: 'http://alegre:3100'
alegre_token: 'dev'
# Alegre Similarity Thresholds
#
# MANDATORY
# 0.7 is a good base-level text similarity score - removing this will have unintended and potentially bad consequences.
image_hash_suggestion_threshold: 0.89
text_elasticsearch_suggestion_threshold: 0.7
text_vector_suggestion_threshold: 0.75
image_hash_matching_threshold: 0.95
text_elasticsearch_matching_threshold: 0.875
text_vector_matching_threshold: 0.95
text_length_matching_threshold: 8
master_similarity_enabled: true
image_similarity_enabled: true
text_similarity_enabled: true
video_similarity_enabled: true
audio_cluster_similarity_threshold: 0.8
video_cluster_similarity_threshold: 0.8
image_cluster_similarity_threshold: 0.9
text_cluster_similarity_threshold: 0.9
similarity_media_file_url_host: ''
min_number_of_words_for_tipline_submit_shortcut: 10
nlu_disambiguation_threshold: 0.11
alegre_timeout: 120
# Localization
#
# OPTIONAL
# Leave blank to use locale in `Accept-Language` HTTP header
# Otherwise set to a single language code
#
locale:
# File upload settings
#
video_file_max_size: 20971520
uploaded_file_max_size: 20971520
image_min_width: 1
image_max_width: 10000
image_min_height: 1
image_max_height: 10000
image_embed_size:
image_thumbnail_size:
# Legal documents settings
#
tos_url: 'https://meedan.com/legal/terms-of-service'
tos_smooch_url: "{\"lang\":{\"en\":\"https://meedan.com/en/check/check_message_tos.html\",\"es\":\"https://meedan.com/es/check/check_message_tos.html\"}}"
privacy_policy_url: 'https://meedan.com/legal/privacy-policy'
privacy_email: '[email protected]'
# 2FA/OTP settings
#
# OPTIONAL
# Generate a key with SecureRandom to enable two-factor authentication (2FA) `SecureRandom.hex(20)`
# If blank the QRCode won't be generated and the 2FA can't be enabled
#
two_factor_key: "a2ab0425f2cfa4243110e343bc865653aea941b91819e754c9a82a0115266add" # '<Google two factor key>'
# Whitelisted hosts used in development to avoid DNS rebinding.
# localhost and 0.0.0.0 are allowed by default
#
# REQUIRED in development
#
# https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#new-config-hosts-setting
#
whitelisted_hosts: 'api'
# File storage on S3 or API equivalent
#
# REQUIRED
# Use values below for local development
#
storage_endpoint: 'http://minio:9000'
storage_asset_host: 'http://localhost:9000/check-api-dev'
storage_access_key: 'AKIAIOSFODNN7EXAMPLE'
storage_secret_key: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
storage_bucket: 'check-api-dev'
storage_bucket_region: 'us-east-1'
storage_path_style:
storage_rewrite_host:
# Screenshot service URL
#
# REQUIRED
# Use values below for local development
#
narcissus_url: 'http://narcissus:8687'
narcissus_token: 'dev'
# Pender service URL
#
# REQUIRED for parsing and archiving URLs
# Use values below for local development
#
pender_url: 'http://localhost:3200'
pender_url_private: 'http://pender:3200'
pender_key: 'dev'
# Fact-checks service URL
#
# OPTIONAL
# Use values below for local development
#
fetch_url: http://fetch:9292
fetch_token: 'dev'
fetch_check_webhook_url: 'http://api:3000'
# Short URLs URL
#
# REQUIRED to build short URLs
#
short_url_host: 'http://localhost:3000'
short_url_host_display: 'http://localhost:3000'
# Exception reporting using Sentry
#
# REQUIRED for deployed environments
# OPTIONAL for development
#
sentry_dsn: # '<SENTRY_DSN>'
sentry_environment: # dev
sentry_traces_sample_rate: # 0
# Email settings
#
# REQUIRED for notification emails
#
support_email: '[email protected]'
default_mail: 'Check <root@localhost>'
send_welcome_email_on_registration: false
smtp_host: 'smtp.gmail.com'
smtp_port: 587
smtp_user: # '<GMAIL USERNAME>'
smtp_pass: # '<GMAIL PASSWORD>'
smtp_default_url_host: 'http://localhost:3333' # Used to construct URLs for links in email
smtp_mailcatcher_host: # 'host.docker.internal'
# Pusher notification service https://pusher.com/channels
#
# REQUIRED
#
pusher_app_id: # '<PUSHER APP ID>'
pusher_key: # '<PUSHER KEY>'
pusher_secret: # '<PUSHER SECRET>'
pusher_cluster: # '<PUSHER CLUSTER>'
# Transifex localization platform https://transifex.com
#
# REQUIRED for dynamic string localization
# OPTIONAL for tasks `rake transifex:XXX`
# By default, latest localizations are included in the codebase
#
# Offical Check localization at https://transifex.com/meedan/check-2
# The user should have a Transifex role of Project Maintainer
#
transifex_user: # '<TRANSIFEX USERNAME>'
transifex_password: # '<TRANSIFEX PASSWORD>'
transifex_project: 'check-2'
# Twitter social login
#
# REQUIRED for Twitter social login
#
twitter_consumer_key: # '<TWITTER APP CONSUMER KEY>'
twitter_consumer_secret: # '<TWITTER APP CONSUMER SECRET>'
# Facebook social login
#
# REQUIRED for Facebook social login
#
facebook_app_id: # '<FACEBOOK APP ID>'
facebook_app_secret: # '<FACEBOOK APP SECRET>'
# Slack social login
#
# REQUIRED for Slack social login
#
slack_app_id: # '<SLACK APP ID>'
slack_app_secret: # '<SLACK APP SECRET>'
# Google social login
#
# REQUIRED for Google social login https://developers.google.com/identity/protocols/oauth2
# On authorized redirect URIs set the callback http://localhost:3000/api/users/auth/google_oauth2/callback
#
google_client_id: 'SECRET'
google_client_secret: 'SECRET'
google_auth_redirect_uri: 'http://localhost:3000/api/users/auth/google_oauth2/callback'
google_credentials_path: '/app/config/credentials.json'
# Smooch (Zendesk Sunshine Conversations) messaging platform gateway https://smooch.io/
#
# REQUIRED for Check Message Twitter integration
# https://docs.smooch.io/guide/twitter/#using-the-integration-api
#
smooch_twitter_consumer_key: # '<SMOOCH TWITTER APP CONSUMER KEY>'
smooch_twitter_consumer_secret: # '<SMOOCH TWITTER APP CONSUMER SECRET>'
smooch_twitter_tier: # '<SMOOCH TWITTER SUBSCRIPTION TIER>'
smooch_twitter_env_name: # '<SMOOCH TWITTER APP ENVIRONMENT LABEL>'
# Smooch (Zendesk Sunshine Conversations) messaging platform gateway https://smooch.io/
#
# REQUIRED for Check Message Facebook integration
# https://docs.smooch.io/guide/facebook-messenger/#using-the-integration-api
#
smooch_facebook_app_id: # '<FACEBOOK APP ID>'
smooch_facebook_app_secret: # '<FACEBOOK APP SECRET>'
# Google Analytics https://analytics.google.com
#
# OPTIONAL
#
google_analytics_code: # '<GOOGLE ANAYTICS CODE>'
# CloudFlare caching https://support.cloudflare.com/hc/en-us/categories/200275248-Caching
#
# OPTIONAL
#
cloudflare_auth_email: # '<CLOUDFLARE AUTH EMAIL>'
cloudflare_auth_key: # '<CLOUDFLARE AUTH KEY>'
cloudflare_zone: # '<CLOUDFLARE ZONE>'
# Open Telemetry configuration, for reporting to Honeycomb
# See initializers/open_telemetry.rb for usage.
#
# OPTIONAL (set to report to Honeycomb Dev environment from local)
# Note: any values prefixed with `otel_custom` are our own configuration
# which will be used to programmatically set otel-supported env vars
#
otel_exporter_otlp_endpoint: # "https://api.honeycomb.io"
otel_exporter_otlp_headers: # "x-honeycomb-team=<DEV API KEY>"
otel_service_name: # "check-api"
otel_resource_attributes:
# developer.name: <DEVELOPER_NAME>
otel_log_level: info
otel_traces_sampler:
otel_custom_sampling_rate:
# Limits
#
# OPTIONAL
# When not set, default values are used.
#
tipline_user_max_messages_per_day: 1500
nlu_global_rate_limit: 100
nlu_user_rate_limit: 30
devise_maximum_attempts: 5
devise_unlock_accounts_after: 1
login_block_limit: 100
api_rate_limit: 100
export_csv_maximum_number_of_results: 10000
export_csv_expire: 604800 # Seconds: Default is 7 days
header_file_video_max_size_whatsapp: 16 # Megabytes
header_file_video_max_size_check: 10 # Megabytes, should be less than WhatsApp limit
url_max_size: 2000
min_number_of_words_for_tipline_long_text: 10
# Session
#
# OPTIONAL
# When not set, default values are used.
#
session_store_key: '_checkdesk_session_dev'
session_store_domain: 'localhost'
# Google API key
#
# OPTIONAL for non-core integrations with Google API
# (for example, Google Civic Information API)
#
google_api_key: '<GOOGLE API KEY>'
test:
<<: *default
checkdesk_base_url_private: http://api:3000
pender_url: 'http://pender:3200'
pender_key: 'test'
alegre_token: 'test'
elasticsearch_index: 'check_test_<%= ENV["TEST_ENV_NUMBER"] %>_index'
elasticsearch_sync: true
elasticsearch_log: false
google_analytics_code:
video_file_max_size: 1000000000
uploaded_file_max_size: 1000000000
image_min_width:
image_max_width:
image_min_height:
image_max_height:
image_embed_size:
image_thumbnail_size:
default_mail: 'root@localhost'
transifex_user:
transifex_password:
transifex_project:
storage_public_endpoint: 'http://localhost:9000/check-api-test'
storage_asset_host: 'http://localhost:9000/check-api-test'
storage_bucket: 'check-api-test'
otel_log_level: error
otel_traces_sampler:
sentry_dsn:
storage_rewrite_host: 'http://minio:9000'
# Facebook social login
#
# REQUIRED to pass Facebook social login tests
#
facebook_app_id: # '<FACEBOOK APP ID>'
facebook_app_secret: # '<FACEBOOK APP SECRET>'
# Slack social login
#
# REQUIRED to pass Slack social login tests
#
slack_app_id: # '<SLACK APP ID>'
slack_app_secret: # '<SLACK APP SECRET>'
production:
<<: *default