unwind/scripts/server-docker

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
478 B
Text
Raw Permalink Normal View History

#!/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"