Files
nxdns/website/demo/db.sh
T

9 lines
465 B
Bash
Executable File

#!/bin/sh
# usage: db.sh /gen/<script>.py /data [args]
# Runs a gen/ script against the nxdemo-data volume as nxdns's uid. TZ is Europe/Paris written as a
# POSIX rule, because alpine ships no zoneinfo; rewrite_history.py shapes the day in local time.
set -eu
DEMO=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
exec docker run --rm -i --user 65532:65532 -e TZ=CET-1CEST,M3.5.0,M10.5.0/3 \
-v nxdemo-data:/data -v "$DEMO/gen:/gen:ro" python:3-alpine python -I "$@"