Switch to central config loader using mounted secret files.

This commit is contained in:
2026-01-13 19:53:08 +00:00
parent cb37774a3a
commit c90163cdce
6 changed files with 127 additions and 38 deletions

View File

@@ -3,6 +3,7 @@ import { createInterface } from 'node:readline';
import XXH from 'xxhashjs';
import { log } from './logger.js';
import { DataIngressPisData } from '@owlboard/backend-data-contracts';
import type { GeneralConfig } from './config.js';
const BASE_URL = process.env.BASEURL || 'https://owlboard.info'
@@ -18,8 +19,8 @@ interface InputRecord {
stops: string[];
}
export async function* processPisStream(inputStream: Readable) {
const TOC = process.env.TOC;
export async function* processPisStream(cfg: GeneralConfig, inputStream: Readable) {
const TOC = cfg.TOC;
if (!TOC) {
log('ERROR', "TOC not set: Exit code 19");
process.exit(19);