This commit is contained in:
jarek committed 2026-01-17 15:06:14 +01:00
1 parent 62636426bf
commit c185d00dc3
60 files changed
+2830 -918

No files matched your search

@@ -37,13 +37,17 @@ export const POST: RequestHandler = async ({ params, request, url, cookies }) =>
currentComposePath = source.composePath;
currentDir = dirname(source.composePath);
} else {
// Stack uses default directory structure
// Stack uses default directory structure - check all valid compose filenames
const stackDir = await findStackDir(name, envIdNum);
if (stackDir) {
const defaultComposePath = join(stackDir, 'docker-compose.yml');
if (existsSync(defaultComposePath)) {
currentComposePath = defaultComposePath;
currentDir = stackDir;
const composeNames = ['compose.yaml', 'compose.yml', 'docker-compose.yml', 'docker-compose.yaml'];
for (const fileName of composeNames) {
const composePath = join(stackDir, fileName);
if (existsSync(composePath)) {
currentComposePath = composePath;
currentDir = stackDir;
break;
}
}
}
}
@@ -47,7 +47,7 @@ export const GET: RequestHandler = async ({ url }) => {
return json({
stackDir,
composePath: `${stackDir}/docker-compose.yml`,
composePath: `${stackDir}/compose.yaml`,
envPath: `${stackDir}/.env`,
source: location ? 'custom' : 'default'
});