-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.js
More file actions
93 lines (82 loc) · 2.79 KB
/
config.js
File metadata and controls
93 lines (82 loc) · 2.79 KB
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
/* eslint no-process-env: 0, strict: 0 */
// NB: This module needs to be requireable without babel
// translation. No advanced features. No imports.
"use strict";
// Use a system environment variable named NODE_ENV, default to "development" if unset.
var env = process.env.NODE_ENV || "development";
var indexAlias = "idigbio";
if(env === "beta") {
indexAlias = "beta";
}
// default to debug logging when in development or test environment
var logger_level
if((env === "development") || (env === "test")) {
logger_level = "debug";
}
var config = {
ENV: env,
LOGGER_LEVEL: process.env.LOGGER_LEVEL || logger_level,
/* Although '2' (HTTP/2) is used in production,
* '1' (HTTP/1.1) is useful for local development,
* since all major web browsers mandate HTTP/2 only over TLS
* and all other web clients may require prior knowledge that this server
* uses HTTP/2 (e.g. `curl --http2-prior-knowledge`). */
HTTP_VERSION: process.env.HTTP_VERSION || '2', //accepted values: '1' '2'
GEN_MOCK: process.env.GEN_MOCK === "true",
CLUSTER: process.env.CLUSTER !== "false",
CLUSTER_WORKERS: Number(process.env.CLUSTER_WORKERS) || require('os').cpus().length,
CI: process.env.CI === "true",
port: 19196,
search: {
server: process.env.NODE_ENV ==='beta' ? "http://c20node1.acis.ufl.edu:9200" : "http://esnodec1.acis.ufl.edu:9200",
index: process.env.SEARCH_INDEX || indexAlias,
statsIndex: process.env.STATS_INDEX || "stats",
},
elasticsearch: {
hosts: process.env.NODE_ENV ==='prod' ? [
"http://esnodec1.acis.ufl.edu:9200",
"http://esnodec2.acis.ufl.edu:9200",
"http://esnodec3.acis.ufl.edu:9200"
] : [
"http://c20node1.acis.ufl.edu:9200",
"http://c20node2.acis.ufl.edu:9200",
"http://c20node3.acis.ufl.edu:9200",
"http://c20node4.acis.ufl.edu:9200",
"http://c20node5.acis.ufl.edu:9200",
"http://c20node6.acis.ufl.edu:9200",
"http://c20node7.acis.ufl.edu:9200",
"http://c20node8.acis.ufl.edu:9200",
"http://c20node9.acis.ufl.edu:9200",
"http://c20node10.acis.ufl.edu:9200",
"http://c20node11.acis.ufl.edu:9200",
"http://c20node12.acis.ufl.edu:9200",
],
apiVersion: "2.4",
sniffOnStart: false,
sniffOnConnectionFault: true,
},
maxRecordsets: 10000,
defaultLimit: 100,
maxLimit: 5000,
recordsets: {},
indexterms: {},
redis: {
host: {
prod: "idb-redis10-prod.acis.ufl.edu",
beta: "idb-redis11-beta.acis.ufl.edu",
}[env] || "localhost",
db: 0,
port: 6379,
password: process.env.IDB_REDIS_AUTH
},
maxTileObjects: 10000,
defaultStyle: {
scale: 'YlOrRd',
pointScale: 'Dark2',
// pointScale: ["#FFF", "#000", "#FAB"],
styleOn: 'scientificname',
styleBuckets: 5
},
cacheTimeout: 14 * 24 * 60 * 60
};
module.exports = config;