Files
nxdns/website/demo/start.sh
T
mokhtar 93e2683e71
Gates / frontend (push) Failing after 8m6s
Gates / package (push) Skipped
Gates / container (push) Skipped
Gates / test (push) Successful in 2m38s
Gates / test-aarch64 (push) Successful in 8m52s
CI / gates (push) Failing after 11m33s
website: nxdns.sh on astro and starlight, with the docs and 0.0.24 screenshots
2026-10-21 17:03:01 +02:00

17 lines
1011 B
Bash
Executable File

#!/bin/sh
# Starts nxdns on the demo LAN, importing etc/config.zon into a fresh nxdemo-data volume on the
# first run. nxdns keeps the image's own uid 65532: under a host uid it was signalled from outside
# docker twice. The data lives in a named volume so no file in this tree is owned by that uid.
set -eu
DEMO=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
IMAGE=${NXDNS_IMAGE:-git.mial.net/mokhtar/nxdns:0.0.24}
docker network inspect nxdemo-lan >/dev/null 2>&1 ||
docker network create --driver bridge --subnet 192.168.50.0/24 --gateway 192.168.50.1 nxdemo-lan
if ! docker volume inspect nxdemo-data >/dev/null 2>&1; then
docker volume create nxdemo-data >/dev/null
docker run --rm -v "$DEMO/etc:/etc/nxdns:ro" -v nxdemo-data:/var/lib/nxdns "$IMAGE" import /etc/nxdns/config.zon
fi
docker run -d --name nxdemo-nxdns --restart unless-stopped \
--network nxdemo-lan --ip 192.168.50.2 --sysctl net.ipv4.ip_unprivileged_port_start=0 \
-p 127.0.0.1:18080:8080 -v nxdemo-data:/var/lib/nxdns "$IMAGE" run