Skip to content

Latest commit

 

History

History
132 lines (98 loc) · 3.05 KB

File metadata and controls

132 lines (98 loc) · 3.05 KB

Docker

Run ERouter in a container. Published image: awhite0030/ERouter — multi-platform linux/amd64 + linux/arm64.


👤 For Users

Quick start

docker run -d \
  -p 20128:20128 \
  -v "$HOME/.erouter:/app/data" \
  -e DATA_DIR=/app/data \
  --name erouter \
  awhite0030/ERouter:latest

App listens on port 20128. Open: http://localhost:20128

Manage container

docker logs -f erouter        # view logs
docker stop erouter           # stop
docker start erouter          # start again
docker rm -f erouter          # remove

Data persistence

-v "$HOME/.erouter:/app/data" \
-e DATA_DIR=/app/data

Without DATA_DIR, the app falls back to ~/.erouter/ (macOS/Linux) or %APPDATA%\erouter\ (Windows). In the container, DATA_DIR=/app/data makes the bind mount work.

Data layout under $DATA_DIR/:

$DATA_DIR/
├── db/
│   ├── data.sqlite       # main SQLite database
│   └── backups/          # auto backups
└── ...                   # certs, logs, runtime configs

Host path: $HOME/.erouter/db/data.sqlite Container path: /app/data/db/data.sqlite

Optional env vars

docker run -d \
  -p 20128:20128 \
  -v "$HOME/.erouter:/app/data" \
  -e DATA_DIR=/app/data \
  -e PORT=20128 \
  -e HOSTNAME=0.0.0.0 \
  -e DEBUG=true \
  --name erouter \
  awhite0030/ERouter:latest

Optional Headroom sidecar

The ERouter image does not bundle Python or Headroom. To use Headroom in Docker, run it as a separate service and point ERouter at that proxy:

services:
  erouter:
    image: awhite0030/ERouter:latest
    ports:
      - "20128:20128"
    volumes:
      - "$HOME/.erouter:/app/data"
    environment:
      DATA_DIR: /app/data
      HEADROOM_URL: http://headroom:8787
    depends_on:
      - headroom

  headroom:
    image: ghcr.io/chopratejas/headroom:latest
    ports:
      - "8787:8787"

In the dashboard, open EndpointToken SaverHeadroom, confirm the URL is http://headroom:8787, recheck status, then enable Headroom.

If Headroom runs on the Docker host instead of as a sidecar, use http://host.docker.internal:8787 on macOS/Windows. On Linux, add --add-host=host.docker.internal:host-gateway or the equivalent compose extra_hosts entry.

Update to latest

docker pull awhite0030/ERouter:latest
docker rm -f erouter
# re-run the quick start command

🛠 For Developers

Build image locally (test)

cd app && docker build -t erouter .

docker run --rm -p 20128:20128 \
  -v "$HOME/.erouter:/app/data" \
  -e DATA_DIR=/app/data \
  erouter

Publish (automatic via CI)

Push a git tag v* → GitHub Actions builds multi-platform (amd64+arm64) and pushes to:

  • ghcr.io/awhite0030/ERouter:v{version} + :latest
  • awhite0030/ERouter:v{version} + :latest
# Use scripts/release.js (recommended)
node scripts/release.js "Release title" "Notes"

# Or manually
git tag v0.4.x && git push origin v0.4.x

Workflow: app/.github/workflows/docker-publish.yml