docs: document one-command Docker installation

This commit is contained in:
2026-07-12 11:44:00 +02:00
parent 2ab91b7c0d
commit 07967bf589
8 changed files with 303 additions and 443 deletions
+7 -1
View File
@@ -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
+10 -1
View File
@@ -3,13 +3,22 @@ set -eu
cd "$(dirname "$0")/.."
test -f .env.example
test -f deploy/secrets/thothii.secrets.example
grep -q '^docker compose up --build -d$' docs/installazione-docker-4-contesti.md
if grep -q 'cp deploy/env.example deploy/.env\|THT_[A-Z0-9_]*_SECRET_FILE=' docs/installazione-docker-4-contesti.md; then
echo "installation guide still presents the legacy per-file secret setup" >&2
exit 1
fi
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT HUP INT TERM
mkdir -p "$tmp/deploy/secrets" "$tmp/deploy/workspaces"
cp compose.yaml "$tmp/compose.yaml"
cp .env.example "$tmp/.env"
printf '%s\n' 'THT_MODEL_API_KEY=example-secret' >"$tmp/deploy/secrets/thothii.secrets"
cp deploy/secrets/thothii.secrets.example "$tmp/deploy/secrets/thothii.secrets"
printf '%s\n' 'THT_MODEL_API_KEY=example-secret' >>"$tmp/deploy/secrets/thothii.secrets"
chmod 0600 "$tmp/deploy/secrets/thothii.secrets"
services=$(docker compose --project-directory "$tmp" config --services)
+2 -2
View File
@@ -58,8 +58,8 @@ run_smoke thothii-smoke-dynamic
while IFS= read -r invocation; do
case "$invocation" in
"compose --project-name thothii-smoke-dynamic --profile external "*) ;;
*) echo "Compose invocation escaped the smoke project/profile: $invocation" >&2; exit 1 ;;
"compose --project-name thothii-smoke-dynamic "*) ;;
*) echo "Compose invocation escaped the smoke project: $invocation" >&2; exit 1 ;;
esac
done <"$log"
grep -q ' down --volumes$' "$log"