Extract API, migrations and portable NAS deployment
This commit is contained in:
commit
673255fa4f
57 files changed
+3799
No files matched your search
@@ -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));
|
||||
Reference in new issue
Block a user