## Features - Add MiniMax TTS provider support (#1043) - Docker images now published on both GHCR & Docker Hub (decolua/9router) — pull from your preferred registry ## Improvements - Replace browser confirm dialogs with custom ConfirmModal (#1060) ## Fixes - Fix Docker `Cannot find module 'next'` error in standalone build - Restore /app/server.js in Docker standalone build (#1064, #1067) - Fix CLI TUI menu arrow-key escape sequences leaking (^[[A^[[B) - Switch macOS/Linux tray to systray2 fork (fixes Kaspersky AV false-positive) (#1080) - Fix zoom controls contrast in topology view (#1066)
28 lines
940 B
JavaScript
28 lines
940 B
JavaScript
#!/usr/bin/env node
|
|
|
|
// Build Docker image locally for current platform (test/dev).
|
|
// Usage: node app/scripts/dockerBuild.js
|
|
|
|
const { execSync } = require("child_process");
|
|
const path = require("path");
|
|
const fs = require("fs");
|
|
|
|
const IMAGE = "decolua/9router";
|
|
const appDir = path.resolve(__dirname, "..");
|
|
const cliPkgPath = path.resolve(appDir, "cli", "package.json");
|
|
const version = JSON.parse(fs.readFileSync(cliPkgPath, "utf8")).version;
|
|
const tag = `v${version}`;
|
|
|
|
console.log(`\n🐳 Building ${IMAGE}:${tag} (local platform)...\n`);
|
|
|
|
try {
|
|
execSync(
|
|
`docker build -t ${IMAGE}:${tag} -t ${IMAGE}:latest .`,
|
|
{ stdio: "inherit", cwd: appDir }
|
|
);
|
|
console.log(`\n✅ Built ${IMAGE}:${tag} + ${IMAGE}:latest`);
|
|
console.log(`▶️ Run: docker run --rm -p 20128:20128 -v "$HOME/.9router:/app/data" -e DATA_DIR=/app/data ${IMAGE}:${tag}`);
|
|
} catch (e) {
|
|
console.error("❌ Docker build failed");
|
|
process.exit(1);
|
|
}
|