mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-25 05:29:07 +01: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
@ -16,6 +16,7 @@ export default function load() {
|
||||
const dir = `${_dirname}/../../../..`;
|
||||
const {
|
||||
ICESHRIMP_CONFIG: configFile,
|
||||
ICESHRIMP_SECRETS: secretsFile,
|
||||
ICESHRIMP_MEDIA_DIR: mediaDir,
|
||||
} = process.env;
|
||||
|
||||
@ -33,7 +34,9 @@ export default function load() {
|
||||
"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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user