smart_ide/setup/install-anythingllm-docker.sh
Nicolas Cantu 088eab84b7 Platform docs, services, ia_dev submodule, smart_ide project config
- Add ia_dev submodule (projects/smart_ide on forge 4nk)
- Document APIs, orchestrator, gateway, local-office, rollout
- Add systemd/scripts layout; relocate setup scripts
- Remove obsolete nginx/enso-only docs from this repo scope
2026-04-03 16:07:58 +02:00

40 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Install / start AnythingLLM on Ubuntu via Docker (official image mintplexlabs/anythingllm).
# Docs: https://docs.anythingllm.com/installation-docker/local-docker
# UI: http://localhost:3001
#
# Optional env:
# STORAGE_LOCATION default: $HOME/anythingllm
# HOST_PORT default: 3001
# Usage: ./install-anythingllm-docker.sh
set -euo pipefail
STORAGE_LOCATION="${STORAGE_LOCATION:-${HOME}/anythingllm}"
HOST_PORT="${HOST_PORT:-3001}"
IMAGE="${ANYTHINGLLM_IMAGE:-mintplexlabs/anythingllm}"
CONTAINER_NAME="${ANYTHINGLLM_CONTAINER_NAME:-anythingllm}"
mkdir -p "${STORAGE_LOCATION}"
touch "${STORAGE_LOCATION}/.env"
docker pull "${IMAGE}"
if docker ps -a --format '{{.Names}}' | grep -qx "${CONTAINER_NAME}"; then
docker rm -f "${CONTAINER_NAME}"
fi
docker run -d \
-p "${HOST_PORT}:3001" \
--name "${CONTAINER_NAME}" \
--cap-add SYS_ADMIN \
--add-host=host.docker.internal:host-gateway \
-v "${STORAGE_LOCATION}:/app/server/storage" \
-v "${STORAGE_LOCATION}/.env:/app/server/.env" \
-e STORAGE_DIR="/app/server/storage" \
"${IMAGE}"
echo "AnythingLLM is starting. Open http://localhost:${HOST_PORT}"
echo "Storage: ${STORAGE_LOCATION}"