created new config lib
This commit is contained in:
parent
bc14acaeba
commit
68a4c2d550
36 changed files with 2681 additions and 134 deletions
90
libs/config-new/config/default.json
Normal file
90
libs/config-new/config/default.json
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"name": "stock-bot",
|
||||
"version": "1.0.0",
|
||||
"debug": false,
|
||||
"service": {
|
||||
"name": "stock-bot-service",
|
||||
"port": 3000,
|
||||
"host": "0.0.0.0",
|
||||
"healthCheckPath": "/health",
|
||||
"metricsPath": "/metrics",
|
||||
"shutdownTimeout": 30000,
|
||||
"cors": {
|
||||
"enabled": true,
|
||||
"origin": "*",
|
||||
"credentials": true
|
||||
}
|
||||
},
|
||||
"logging": {
|
||||
"level": "info",
|
||||
"format": "json",
|
||||
"loki": {
|
||||
"enabled": false,
|
||||
"host": "localhost",
|
||||
"port": 3100,
|
||||
"labels": {}
|
||||
}
|
||||
},
|
||||
"database": {
|
||||
"postgres": {
|
||||
"host": "localhost",
|
||||
"port": 5432,
|
||||
"database": "stockbot",
|
||||
"user": "postgres",
|
||||
"password": "postgres",
|
||||
"ssl": false,
|
||||
"poolSize": 10,
|
||||
"connectionTimeout": 30000,
|
||||
"idleTimeout": 10000
|
||||
},
|
||||
"questdb": {
|
||||
"host": "localhost",
|
||||
"ilpPort": 9009,
|
||||
"httpPort": 9000,
|
||||
"pgPort": 8812,
|
||||
"database": "questdb",
|
||||
"user": "admin",
|
||||
"password": "quest",
|
||||
"bufferSize": 65536,
|
||||
"flushInterval": 1000
|
||||
},
|
||||
"mongodb": {
|
||||
"host": "localhost",
|
||||
"port": 27017,
|
||||
"database": "stockbot",
|
||||
"authSource": "admin",
|
||||
"poolSize": 10
|
||||
},
|
||||
"dragonfly": {
|
||||
"host": "localhost",
|
||||
"port": 6379,
|
||||
"db": 0,
|
||||
"maxRetries": 3,
|
||||
"retryDelay": 100
|
||||
}
|
||||
},
|
||||
"queue": {
|
||||
"redis": {
|
||||
"host": "localhost",
|
||||
"port": 6379,
|
||||
"db": 1
|
||||
},
|
||||
"defaultJobOptions": {
|
||||
"attempts": 3,
|
||||
"backoff": {
|
||||
"type": "exponential",
|
||||
"delay": 1000
|
||||
},
|
||||
"removeOnComplete": true,
|
||||
"removeOnFail": false
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"timeout": 30000,
|
||||
"retries": 3,
|
||||
"retryDelay": 1000,
|
||||
"proxy": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
48
libs/config-new/config/development.json
Normal file
48
libs/config-new/config/development.json
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"debug": true,
|
||||
"logging": {
|
||||
"level": "debug",
|
||||
"format": "pretty"
|
||||
},
|
||||
"providers": {
|
||||
"eod": {
|
||||
"name": "eod-historical-data",
|
||||
"enabled": true,
|
||||
"priority": 1,
|
||||
"apiKey": "demo",
|
||||
"tier": "free",
|
||||
"rateLimit": {
|
||||
"maxRequests": 20,
|
||||
"windowMs": 60000
|
||||
}
|
||||
},
|
||||
"yahoo": {
|
||||
"name": "yahoo-finance",
|
||||
"enabled": true,
|
||||
"priority": 2,
|
||||
"rateLimit": {
|
||||
"maxRequests": 100,
|
||||
"windowMs": 60000
|
||||
}
|
||||
},
|
||||
"ib": {
|
||||
"name": "interactive-brokers",
|
||||
"enabled": false,
|
||||
"priority": 0,
|
||||
"gateway": {
|
||||
"host": "localhost",
|
||||
"port": 5000,
|
||||
"clientId": 1
|
||||
},
|
||||
"marketDataType": "delayed"
|
||||
},
|
||||
"qm": {
|
||||
"name": "quotemedia",
|
||||
"enabled": false,
|
||||
"priority": 3,
|
||||
"username": "",
|
||||
"password": "",
|
||||
"webmasterId": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
32
libs/config-new/config/production.json
Normal file
32
libs/config-new/config/production.json
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"debug": false,
|
||||
"logging": {
|
||||
"level": "warn",
|
||||
"format": "json",
|
||||
"loki": {
|
||||
"enabled": true,
|
||||
"labels": {
|
||||
"app": "stock-bot",
|
||||
"env": "production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"database": {
|
||||
"postgres": {
|
||||
"ssl": true,
|
||||
"poolSize": 20
|
||||
},
|
||||
"questdb": {
|
||||
"bufferSize": 131072,
|
||||
"flushInterval": 500
|
||||
},
|
||||
"mongodb": {
|
||||
"poolSize": 20
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"timeout": 60000,
|
||||
"retries": 5,
|
||||
"retryDelay": 2000
|
||||
}
|
||||
}
|
||||
42
libs/config-new/config/test.json
Normal file
42
libs/config-new/config/test.json
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"debug": true,
|
||||
"logging": {
|
||||
"level": "error",
|
||||
"format": "json"
|
||||
},
|
||||
"service": {
|
||||
"port": 0,
|
||||
"shutdownTimeout": 5000
|
||||
},
|
||||
"database": {
|
||||
"postgres": {
|
||||
"database": "stockbot_test",
|
||||
"poolSize": 5
|
||||
},
|
||||
"questdb": {
|
||||
"database": "questdb_test"
|
||||
},
|
||||
"mongodb": {
|
||||
"database": "stockbot_test",
|
||||
"poolSize": 5
|
||||
},
|
||||
"dragonfly": {
|
||||
"db": 15,
|
||||
"keyPrefix": "test:"
|
||||
}
|
||||
},
|
||||
"queue": {
|
||||
"redis": {
|
||||
"db": 15
|
||||
},
|
||||
"defaultJobOptions": {
|
||||
"attempts": 1,
|
||||
"removeOnComplete": false,
|
||||
"removeOnFail": false
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"timeout": 5000,
|
||||
"retries": 1
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue