docs: document one-command Docker installation
This commit is contained in:
@@ -7,6 +7,11 @@ marker="smoke-$(date +%s)-$$"
|
||||
headers=""
|
||||
smoke_project=${SMOKE_PROJECT:-"thothii-smoke-$(date +%s)-$$"}
|
||||
keep_resources=${KEEP_SMOKE_RESOURCES:-0}
|
||||
bundle=$(mktemp)
|
||||
printf '%s\n' '# disposable smoke bundle' 'THT_MODEL_API_KEY=smoke-model-key' >"$bundle"
|
||||
chmod 0600 "$bundle"
|
||||
export THT_SECRETS_FILE="$bundle"
|
||||
trap 'rm -f "$bundle"' EXIT HUP INT TERM
|
||||
|
||||
case "$smoke_project" in
|
||||
thothii)
|
||||
@@ -20,7 +25,7 @@ case "$smoke_project" in
|
||||
esac
|
||||
|
||||
compose() {
|
||||
docker compose --project-name "$smoke_project" --profile external "$@"
|
||||
docker compose --project-name "$smoke_project" "$@"
|
||||
}
|
||||
# Avoid colliding with a developer's existing service. Production/developer Compose still
|
||||
# defaults to 8080; a published port of 0 asks Docker for a free ephemeral smoke port.
|
||||
@@ -28,6 +33,7 @@ export THOTH_HTTP_PORT=${THOTH_HTTP_PORT:-0}
|
||||
|
||||
cleanup() {
|
||||
if [ -n "$headers" ]; then rm -f "$headers"; fi
|
||||
rm -f "$bundle"
|
||||
if [ "$keep_resources" = "1" ]; then
|
||||
echo "Keeping smoke resources for project $smoke_project (KEEP_SMOKE_RESOURCES=1)." >&2
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user