mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-28 12:57:31 -07:00
[backend] Add support for a second config file containing secrets
This is required for some packaging scenarios
This commit is contained in:
parent
5490137f44
commit
026538f8a1
1 changed files with 4 additions and 1 deletions
|
@ -16,6 +16,7 @@ export default function load() {
|
||||||
const dir = `${_dirname}/../../../..`;
|
const dir = `${_dirname}/../../../..`;
|
||||||
const {
|
const {
|
||||||
ICESHRIMP_CONFIG: configFile,
|
ICESHRIMP_CONFIG: configFile,
|
||||||
|
ICESHRIMP_SECRETS: secretsFile,
|
||||||
ICESHRIMP_MEDIA_DIR: mediaDir,
|
ICESHRIMP_MEDIA_DIR: mediaDir,
|
||||||
} = process.env;
|
} = process.env;
|
||||||
|
|
||||||
|
@ -33,7 +34,9 @@ export default function load() {
|
||||||
"utf-8",
|
"utf-8",
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
const config = yaml.load(fs.readFileSync(path, "utf-8")) as Source;
|
let config = yaml.load(fs.readFileSync(path, "utf-8")) as Source;
|
||||||
|
if (secretsFile !== undefined)
|
||||||
|
config = Object.assign(config, yaml.load(fs.readFileSync(secretsFile, "utf-8")) as Source);
|
||||||
|
|
||||||
const mixin = {} as Mixin;
|
const mixin = {} as Mixin;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue