import { EggRedisOptions } from 'egg-redis' ; import { TracerConfig , defaultTracerConfig } from '@mw-components/jaeger' ; import { Config as KoidConfig } from '@mw-components/koid' ; import { ConnectionOptions } from 'typeorm' ; import { RabbitmqConfig } from './config.types' ; export { jwtConfig , jwtMiddlewareConfig , jwtAuth } from './config.local' ; export const security = { csrf : false , } ; export const orm = { type : 'mysql' , host : process . env . MYSQL_HOST || '127.0.0.1' , port : + process . env . MYSQL_PORT || 3306 , username : process . env . MYSQL_USER || 'root' , password : process . env . MYSQL_PASSWORD || 'password' , database : process . env . MYSQL_DATABASE || 'shop_development' , synchronize : false , logging : false , } ; export const redis = { client : { port : + process . env . REDIS_PORT || 6379 , host : process . env . REDIS_HOST || '127.0.0.1' , password : process . env . REDIS_PASSWORD || '' , db : + process . env . REDIS_DB || 0 , } , } ; export const logger = { disableConsoleAfterReady : false , } ; export const tracer = { ... defaultTracerConfig , whiteList : [ '/favicon.ico' , '/favicon.png' , '/ping' , '/metrics' , '/untracedPath' , '' , /\/unitTest[\d.]+/u , ] , tracingConfig : { sampler : { type : 'const' , param : 1 , } , reporter : { agentHost : '127.0.0.1' , } , } , } ; const epoch = 1577836800000 ; export const koid = { dataCenter : 12 , worker : 23 , epoch , } ; export const rabbitmq = { url : 'amqp://rabbitmq' , } ;