# v0.4.36 (2026-05-13)

## 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)
This commit is contained in:
decolua
2026-05-13 18:22:31 +07:00
parent 692d1fdf57
commit 7ccf8c5e84
14 changed files with 616 additions and 314 deletions
+79 -59
View File
@@ -1,55 +1,12 @@
# Docker
This project ships with a `Dockerfile` for building and running 9Router in a container.
Run 9Router in a container. Published image: [`decolua/9router`](https://hub.docker.com/r/decolua/9router) — multi-platform `linux/amd64` + `linux/arm64`.
## Build image
---
```bash
docker build -t 9router .
```
# 👤 For Users
## Start container
```bash
docker run --rm \
-p 20128:20128 \
-v "$HOME/.9router:/app/data" \
-e DATA_DIR=/app/data \
--name 9router \
9router
```
The app listens on port `20128` in the container.
## What the volume does
```bash
-v "$HOME/.9router:/app/data" \
-e DATA_DIR=/app/data
```
`9router` stores its database at `path.join(DATA_DIR, "db.json")`.
Without `DATA_DIR`, the app falls back to the current user's home directory (for example `~/.9router/db.json` on macOS/Linux). In the container, set `DATA_DIR=/app/data` so the bind mount is actually used.
With the example above, the database file is:
```text
/app/data/db.json
```
and it is persisted on the host at:
```text
$HOME/.9router/db.json
```
## Stop container
```bash
docker stop 9router
```
## Run in background
## Quick start
```bash
docker run -d \
@@ -57,23 +14,46 @@ docker run -d \
-v "$HOME/.9router:/app/data" \
-e DATA_DIR=/app/data \
--name 9router \
9router
decolua/9router:latest
```
## View logs
App listens on port `20128`. Open: http://localhost:20128
## Manage container
```bash
docker logs -f 9router
docker logs -f 9router # view logs
docker stop 9router # stop
docker start 9router # start again
docker rm -f 9router # remove
```
## Optional environment variables
You can override runtime env vars with `-e`.
Example:
## Data persistence
```bash
docker run --rm \
-v "$HOME/.9router:/app/data" \
-e DATA_DIR=/app/data
```
Without `DATA_DIR`, the app falls back to `~/.9router/` (macOS/Linux) or `%APPDATA%\9router\` (Windows). In the container, `DATA_DIR=/app/data` makes the bind mount work.
Data layout under `$DATA_DIR/`:
```text
$DATA_DIR/
├── db/
│ ├── data.sqlite # main SQLite database
│ └── backups/ # auto backups
└── ... # certs, logs, runtime configs
```
Host path: `$HOME/.9router/db/data.sqlite`
Container path: `/app/data/db/data.sqlite`
## Optional env vars
```bash
docker run -d \
-p 20128:20128 \
-v "$HOME/.9router:/app/data" \
-e DATA_DIR=/app/data \
@@ -81,13 +61,53 @@ docker run --rm \
-e HOSTNAME=0.0.0.0 \
-e DEBUG=true \
--name 9router \
decolua/9router:latest
```
## Update to latest
```bash
docker pull decolua/9router:latest
docker rm -f 9router
# re-run the quick start command
```
---
# 🛠 For Developers
## Build image locally
```bash
# from repo root
npm run docker:build
```
Or directly:
```bash
cd app && docker build -t 9router .
```
Run local build:
```bash
docker run --rm -p 20128:20128 \
-v "$HOME/.9router:/app/data" \
-e DATA_DIR=/app/data \
9router
```
## Rebuild after code changes
## Publish to Docker Hub (multi-platform)
Triggered automatically by `npm run cli:publish`. Manual:
```bash
docker build -t 9router .
# 1. Login once
docker login
# 2. Build amd64 + arm64 + push (tag from app/cli/package.json version)
npm run docker:publish
```
Then restart the container.
Tags pushed:
- `decolua/9router:v{version}`
- `decolua/9router:latest`