fix(deploy): allow canonical compose env override (#799)
Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
import { existsSync, readFileSync } from "node:fs";
|
import { existsSync, readFileSync } from "node:fs";
|
||||||
|
import { join } from "node:path";
|
||||||
import { rootPath } from "./config";
|
import { rootPath } from "./config";
|
||||||
|
|
||||||
export function canonicalComposeEnvFile(): string {
|
export function canonicalComposeEnvFile(): string {
|
||||||
|
const explicitFile = process.env.UNIDESK_COMPOSE_ENV_FILE?.trim();
|
||||||
|
if (explicitFile) return explicitFile;
|
||||||
|
const stateDir = process.env.UNIDESK_STATE_DIR?.trim();
|
||||||
|
if (stateDir) return join(stateDir, "docker-compose.env");
|
||||||
return rootPath(".state", "docker-compose.env");
|
return rootPath(".state", "docker-compose.env");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user