Add be9700-api: TP-Link BE9700 router API proxy + Scalar docs

This commit is contained in:
2026-06-29 12:23:15 -07:00
parent 19fa1c7821
commit bf09e224c9
6 changed files with 145 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# be9700-api — Build Notes
## Image
`git.alexzaw.dev/alexz/be9700-api:<tag>`
## Source
`/home/alexz/be9700-api` (also mirrored to `https://git.alexzaw.dev/alexz/be9700-api`)
The Dockerfile lives in the root of the source directory alongside `server.js`.
## Architecture
- **amd64 only** — the app is pure Node.js (no native addons) but the image is
only built and tested on the amd64 host. Add `--platform linux/arm64` to the
build command and push a separate tag to add arm64 support.
## Security
`.dockerignore` excludes `.env`, `.env.*`, `.git`, `scripts/`, `*.log`, `*.curl`,
`network-captures.js`. The image contains no router credentials.
## Build
```bash
# From this directory:
bash build.sh
# Or with overrides:
IMAGE_TAG=1.0.1 bash build.sh --no-cache
```
Requires the Docker daemon to be authenticated to `git.alexzaw.dev`.

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Build and push the be9700-api Docker image from the source in /home/alexz/be9700-api.
# The Dockerfile lives alongside the source (not in this build/ dir).
set -euo pipefail
IMAGE_NAME="${IMAGE_NAME:-git.alexzaw.dev/alexz/be9700-api}"
IMAGE_TAG="${IMAGE_TAG:-1.0.0}"
SOURCE_DIR="${SOURCE_DIR:-/home/alexz/be9700-api}"
echo "==> Building ${IMAGE_NAME}:${IMAGE_TAG}"
docker build "$@" \
-t "${IMAGE_NAME}:${IMAGE_TAG}" \
-t "${IMAGE_NAME}:latest" \
"${SOURCE_DIR}"
echo "==> Pushing ${IMAGE_NAME}:${IMAGE_TAG}"
docker push "${IMAGE_NAME}:${IMAGE_TAG}"
echo "==> Pushing ${IMAGE_NAME}:latest"
docker push "${IMAGE_NAME}:latest"
echo ""
echo "Done. To update on Runtipi:"
echo " cd /etc/runtipi/repos/runtipi && sudo git add . && sudo git commit -m 'be9700-api: bump' && sudo git push origin main"
echo " sudo /etc/runtipi/runtipi-cli appstore update"
echo " sudo /etc/runtipi/runtipi-cli app update be9700-api:runtipi"