Extract API, migrations and portable NAS deployment

This commit is contained in:
tomchukk committed 2026-09-07 19:34:49 +03:00
commit 673255fa4f
57 files changed
+3799

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
import { spawnSync } from 'node:child_process';
export function compose(args) {
const engine = ['docker', 'podman'].find(command => spawnSync(command, ['version'], { stdio: 'ignore' }).status === 0);
if (!engine) throw new Error('Start Docker Desktop or Podman, then retry.');
const result = spawnSync(engine, ['compose', '--env-file', '.env', '-f', 'infra/compose.yaml', ...args], { stdio: 'inherit' });
if (result.error) throw result.error;
if (result.status !== 0) throw new Error(`Compose failed (${result.status})`);
}
if (process.argv[1]?.replaceAll('\\', '/').endsWith('/compose.mjs')) compose(process.argv.slice(2));