Fix whisper docker status detection for compose profile

This commit is contained in:
William Valentin
2026-02-22 19:37:49 -08:00
parent 8fcbb5f521
commit 453eb264df
3 changed files with 30 additions and 9 deletions
+7 -2
View File
@@ -30,6 +30,11 @@ interface ComposePsEntry {
}
const WHISPER_SERVICE = 'whisper-server';
const WHISPER_PROFILE = 'voice';
function withWhisperProfile(args: string[]): string[] {
return ['--profile', WHISPER_PROFILE, ...args];
}
function defaultRunner(args: string[]): Promise<DockerComposeResult> {
return execFile('docker', ['compose', '-f', 'docker-compose.yml', ...args], {
@@ -154,7 +159,7 @@ export async function listDockerDependencyStatuses(
let services: string[];
try {
const response = await runner(['config', '--services']);
const response = await runner(withWhisperProfile(['config', '--services']));
services = parseServiceList(response.stdout);
} catch (error) {
return [{
@@ -174,7 +179,7 @@ export async function listDockerDependencyStatuses(
}
try {
const response = await runner(['ps', WHISPER_SERVICE, '--format', 'json']);
const response = await runner(withWhisperProfile(['ps', WHISPER_SERVICE, '--format', 'json']));
const rows = parseComposePsOutput(response.stdout)
.filter((entry) => (entry.Service ?? '') === WHISPER_SERVICE || !entry.Service);