wip
This commit is contained in:
parent
4b14265ec2
commit
fd78e097c6
|
|
@ -17,7 +17,7 @@ const _filename = fileURLToPath(import.meta.url);
|
||||||
const _dirname = dirname(_filename);
|
const _dirname = dirname(_filename);
|
||||||
|
|
||||||
const configDir = resolve(_dirname, '../../../.config');
|
const configDir = resolve(_dirname, '../../../.config');
|
||||||
const OUTPUT_PATH = resolve(_dirname, '../../../built/.config.json');
|
const OUTPUT_PATH = resolve(_dirname, '../../../.config/.config.json');
|
||||||
|
|
||||||
// TODO: yamlのパースに失敗したときのエラーハンドリング
|
// TODO: yamlのパースに失敗したときのエラーハンドリング
|
||||||
|
|
||||||
|
|
@ -27,8 +27,8 @@ const OUTPUT_PATH = resolve(_dirname, '../../../built/.config.json');
|
||||||
*/
|
*/
|
||||||
function yamlToJson(ymlPath) {
|
function yamlToJson(ymlPath) {
|
||||||
if (!fs.existsSync(ymlPath)) {
|
if (!fs.existsSync(ymlPath)) {
|
||||||
console.error(`YAML file not found: ${ymlPath}`);
|
console.log(`YAML file not found: ${ymlPath}`);
|
||||||
process.exit(1);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`${ymlPath} → ${OUTPUT_PATH}`);
|
console.log(`${ymlPath} → ${OUTPUT_PATH}`);
|
||||||
|
|
|
||||||
|
|
@ -217,9 +217,9 @@ export type FulltextSearchProvider = 'sqlLike' | 'sqlPgroonga' | 'meilisearch';
|
||||||
const _filename = fileURLToPath(import.meta.url);
|
const _filename = fileURLToPath(import.meta.url);
|
||||||
const _dirname = dirname(_filename);
|
const _dirname = dirname(_filename);
|
||||||
|
|
||||||
const compiledConfigFilePathForTest = resolve(_dirname, '../../../built/._config_.json');
|
const compiledConfigFilePathForTest = resolve(_dirname, '../../../.config/._config_.json');
|
||||||
|
|
||||||
export const compiledConfigFilePath = fs.existsSync(compiledConfigFilePathForTest) ? compiledConfigFilePathForTest : resolve(_dirname, '../../../built/.config.json');
|
export const compiledConfigFilePath = fs.existsSync(compiledConfigFilePathForTest) ? compiledConfigFilePathForTest : resolve(_dirname, '../../../.config/.config.json');
|
||||||
|
|
||||||
export function loadConfig(): Config {
|
export function loadConfig(): Config {
|
||||||
if (!fs.existsSync(compiledConfigFilePath)) {
|
if (!fs.existsSync(compiledConfigFilePath)) {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: ./.config/a.test.config.json
|
source: ./.config/a.test.config.json
|
||||||
target: /misskey/built/._config_.json
|
target: /misskey/.config/._config_.json
|
||||||
read_only: true
|
read_only: true
|
||||||
|
|
||||||
db.a.test:
|
db.a.test:
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: ./.config/b.test.config.json
|
source: ./.config/b.test.config.json
|
||||||
target: /misskey/built/._config_.json
|
target: /misskey/.config/._config_.json
|
||||||
read_only: true
|
read_only: true
|
||||||
|
|
||||||
db.b.test:
|
db.b.test:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue