unwind/scripts/server-docker
2024-05-11 19:45:39 +02:00

26 lines
478 B
Bash
Executable file

#!/bin/sh -eu
: "${DOCKER_BIN:=docker}"
: "${UNWIND_PORT:=8097}"
cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
version=$(cat build/version)
localhost=127.0.0.1
localport=8000
netloc="$localhost:$localport"
echo >&2 "Unwind will be available on http://$netloc/
"
$DOCKER_BIN run \
--init \
-it --rm \
--read-only \
--memory '500m' \
--publish "$netloc":"$UNWIND_PORT" \
--volume "$RUN_DIR"/data:/data \
"code.dumpr.org/ducklet/unwind":"$version"