We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 110ce70 commit 739f635Copy full SHA for 739f635
1 file changed
lib/config/dockerSecret.js lib/config/dockerSecret.tslib/config/dockerSecret.js renamed to lib/config/dockerSecret.ts
@@ -1,18 +1,17 @@
1
-'use strict'
2
-
3
-const fs = require('fs')
4
-const path = require('path')
+import * as fs from "fs";
+import * as path from "path";
5
6
const basePath = path.resolve('/var/run/secrets/')
7
8
-function getSecret (secret) {
+function getSecret(secret) {
9
const filePath = path.join(basePath, secret)
10
if (fs.existsSync(filePath)) return fs.readFileSync(filePath)
11
return undefined
12
}
13
+let dockerSecretConfig: any = {}
14
if (fs.existsSync(basePath)) {
15
- module.exports = {
+ dockerSecretConfig = {
16
dbURL: getSecret('dburl'),
17
// ssl path
18
sslKeyPath: getSecret('sslkeypath'),
@@ -77,3 +76,5 @@ if (fs.existsSync(basePath)) {
77
76
78
79
+
80
+export = dockerSecretConfig
0 commit comments