Skip to content

Commit 448efe8

Browse files
committed
feat: update config
1 parent 4803867 commit 448efe8

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,11 @@ ENV REDIS_AUTH=
5656
ENV REDIS_SERVERS=
5757
ENV REDIS_IS_CLUSTER=
5858

59-
ENV DATABASE_NAME=transactionHistory
6059
ENV DATABASE_URL=
6160
ENV DATABASE_USER=root
6261
ENV DATABASE_PASSWORD=
63-
ENV COLLECTION_NAME=transactions
64-
ENV TRANSACTION_CONFIG_DB=Configuration
65-
ENV TRANSACTION_CONFIG_COLLECTION=transactionConfiguration
62+
ENV CONFIGURATION_DB=Configuration
63+
ENV TRANSACTION_DB=transactionHistory
6664
ENV DATABASE_CERT_PATH=
6765

6866
ENV APM_ACTIVE=true

src/config.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ export interface IConfig {
2020
active: string;
2121
};
2222
db: {
23-
name: string;
2423
password: string;
2524
url: string;
2625
user: string;
27-
collectionName: string;
28-
transactionConfigDb: string;
29-
transactionConfigCollection: string;
26+
configurationDb: string;
27+
transactionDb: string;
3028
dbCertPath: string;
3129
};
3230
logstash: {
@@ -46,13 +44,11 @@ export const configuration: IConfig = {
4644
active: process.env.APM_ACTIVE as string,
4745
},
4846
db: {
49-
name: process.env.DATABASE_NAME as string,
5047
password: process.env.DATABASE_PASSWORD as string,
5148
url: process.env.DATABASE_URL as string,
5249
user: process.env.DATABASE_USER as string,
53-
collectionName: process.env.COLLECTION_NAME as string,
54-
transactionConfigDb: process.env.TRANSACTION_CONFIG_DB as string,
55-
transactionConfigCollection: process.env.TRANSACTION_CONFIG_COLLECTION as string,
50+
configurationDb: process.env.CONFIGURATION_DB as string,
51+
transactionDb: process.env.TRANSACTION_DB as string,
5652
dbCertPath: process.env.DATABASE_CERT_PATH as string,
5753
},
5854
env: process.env.NODE_ENV as string,

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ const databaseManagerConfig = {
1515
isCluster: configuration.redis.isCluster,
1616
},
1717
configuration: {
18-
databaseName: configuration.db.name,
18+
databaseName: configuration.db.configurationDb,
1919
certPath: configuration.db.dbCertPath,
2020
password: configuration.db.password,
2121
url: configuration.db.url,
2222
user: configuration.db.user,
2323
},
2424
transactionHistory: {
25-
databaseName: configuration.db.transactionConfigDb,
25+
databaseName: configuration.db.transactionDb,
2626
url: configuration.db.url,
2727
password: configuration.db.password,
2828
user: configuration.db.user,

0 commit comments

Comments
 (0)