okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge commit 'ae31e3cd3' into f-split-int2aeb246cf

main
631 B10 linesraw
1#!/bin/sh
2# `strata` inside the container: the Terminal, with the address and the API key of the server this container runs, so that
3# `docker exec <name> strata monitor --once`, `strata status` and `strata connect opencode` work without typing either.
4# A key or address you set yourself (STRATA_API_KEY, STRATA_URL, --url) always wins.
5KEY_FILE="${STRATA_KEY_FILE:-/data/state/api-key}"
6if [ -z "${STRATA_API_KEY:-}" ] && [ -r "$KEY_FILE" ]; then
7  STRATA_API_KEY=$(cat "$KEY_FILE"); export STRATA_API_KEY
8fi
9STRATA_URL="${STRATA_URL:-http://127.0.0.1:${PORT:-8080}}"; export STRATA_URL
10exec /opt/strata/terminal/bin/strata "$@"