Skip to content
Snippets Groups Projects
Unverified Commit b9b9cd0c authored by tamaina's avatar tamaina Committed by GitHub
Browse files

enhance(server): 環境変数MISSKEY_CONFIG_YMLでdefault.ymlを任意のymlに変更可能に (#10712)

* enhance(server): MISSKEY_CONFIG_YMLでconfigを設定可能に

* update changelog
parent f3206d09
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,7 @@
- 新しい実績を追加
### Server
- 環境変数MISSKEY_CONFIG_YMLで設定ファイルをdefault.ymlから変更可能に
- Fix: エクスポートデータの拡張子がunknownになる問題を修正
- Fix: Content-Dispositionのパースでエラーが発生した場合にダウンロードが完了しない問題を修正
- Fix: API: i/update avatarIdとbannerIdにnullを渡した時、画像がリセットされない問題を修正
......
......@@ -4,7 +4,7 @@
import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import { dirname, resolve } from 'node:path';
import * as yaml from 'js-yaml';
/**
......@@ -132,10 +132,11 @@ const dir = `${_dirname}/../../../.config`;
/**
* Path of configuration file
*/
const path = process.env.NODE_ENV === 'test'
? `${dir}/test.yml`
: `${dir}/default.yml`;
const path = process.env.MISSKEY_CONFIG_YML
? resolve(dir, process.env.MISSKEY_CONFIG_YML)
: process.env.NODE_ENV === 'test'
? resolve(dir, 'test.yml')
: resolve(dir, 'config.yml');
export function loadConfig() {
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/meta.json`, 'utf-8'));
const clientManifestExists = fs.existsSync(_dirname + '/../../../built/_vite_/manifest.json');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment