mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-11 12:11:45 +00:00
fix: installer review follow-ups
- install.sh saves the get.docker.com and uv installers to a file and runs them only after the download finished, so a cut-off transfer runs nothing. - Neither installer prints DOCSGPT_PACKAGE, which may be a URL with credentials. - The CI step assigns the wheel path before exporting it, so a missing wheel fails instead of installing from PyPI. - Docker-Deploying shows one code block per platform; Quickstart names the /opt/docsgpt home used for root on Linux.
This commit is contained in:
1 parent
bd35281259
commit
49823a6859
5 files changed
+31
-8
No files matched your search
@@ -108,7 +108,9 @@ jobs:
|
||||
# Same Compose project name as the step above; stop that stack first.
|
||||
docker compose -f deployment/docker-compose-standalone.yaml down -v
|
||||
pipx run build --wheel --outdir "$RUNNER_TEMP/dist"
|
||||
export DOCSGPT_PACKAGE="$(ls "$RUNNER_TEMP"/dist/docsgpt-*.whl)"
|
||||
# Assigned before export, so a missing wheel fails here instead of installing from PyPI.
|
||||
DOCSGPT_PACKAGE="$(ls "$RUNNER_TEMP"/dist/docsgpt-*.whl)"
|
||||
export DOCSGPT_PACKAGE
|
||||
# No uv is set up beforehand, so the installer's pinned uv download runs too.
|
||||
# Without a terminal the installer passes --yes to docsgpt up.
|
||||
bash deployment/install.sh --image-tag verify </dev/null
|
||||
|
||||
@@ -61,7 +61,7 @@ function Install-DocsGPT {
|
||||
throw 'Set DOCSGPT_VERSION or DOCSGPT_PACKAGE, not both.'
|
||||
}
|
||||
if ($env:DOCSGPT_PACKAGE) {
|
||||
Say "Installing docsgpt from $env:DOCSGPT_PACKAGE"
|
||||
Say 'Installing docsgpt from DOCSGPT_PACKAGE'
|
||||
& $uv tool install --reinstall --python 3.12 $env:DOCSGPT_PACKAGE
|
||||
} elseif ($env:DOCSGPT_VERSION) {
|
||||
Say "Installing docsgpt $env:DOCSGPT_VERSION"
|
||||
|
||||
+17
-3
@@ -47,6 +47,20 @@ main() {
|
||||
die "curl or wget is needed to download $1"
|
||||
fi
|
||||
}
|
||||
# run_downloaded URL COMMAND...: save URL to a file, then run COMMAND with the file as its last
|
||||
# argument. A transfer cut short fails before anything runs.
|
||||
run_downloaded() {
|
||||
local url="$1" script status=0
|
||||
shift
|
||||
script="$(mktemp)"
|
||||
if ! download "$url" >"$script"; then
|
||||
rm -f "$script"
|
||||
die "could not download $url"
|
||||
fi
|
||||
"$@" "$script" || status=$?
|
||||
rm -f "$script"
|
||||
return "$status"
|
||||
}
|
||||
# version_ge A B: A >= B for dotted version numbers.
|
||||
version_ge() {
|
||||
local -a left right
|
||||
@@ -82,7 +96,7 @@ main() {
|
||||
sudo="sudo"
|
||||
fi
|
||||
say "Installing Docker"
|
||||
download https://get.docker.com | $sudo sh
|
||||
run_downloaded https://get.docker.com $sudo sh
|
||||
$sudo systemctl enable --now docker >/dev/null 2>&1 || true
|
||||
if [ -n "$sudo" ]; then
|
||||
$sudo usermod -aG docker "$(id -un)"
|
||||
@@ -108,7 +122,7 @@ main() {
|
||||
if [ -z "$uv" ]; then
|
||||
local uv_dir="${XDG_BIN_HOME:-$HOME/.local/bin}"
|
||||
say "Installing uv $UV_VERSION into $uv_dir"
|
||||
download "https://astral.sh/uv/$UV_VERSION/install.sh" | env UV_INSTALL_DIR="$uv_dir" UV_NO_MODIFY_PATH=1 UV_PRINT_QUIET=1 sh
|
||||
run_downloaded "https://astral.sh/uv/$UV_VERSION/install.sh" env UV_INSTALL_DIR="$uv_dir" UV_NO_MODIFY_PATH=1 UV_PRINT_QUIET=1 sh
|
||||
uv="$uv_dir/uv"
|
||||
[ -x "$uv" ] || die "uv did not install into $uv_dir"
|
||||
fi
|
||||
@@ -117,7 +131,7 @@ main() {
|
||||
die "set DOCSGPT_VERSION or DOCSGPT_PACKAGE, not both"
|
||||
fi
|
||||
if [ -n "${DOCSGPT_PACKAGE:-}" ]; then
|
||||
say "Installing docsgpt from $DOCSGPT_PACKAGE"
|
||||
say "Installing docsgpt from DOCSGPT_PACKAGE"
|
||||
"$uv" tool install --reinstall --python 3.12 "$DOCSGPT_PACKAGE"
|
||||
elif [ -n "${DOCSGPT_VERSION:-}" ]; then
|
||||
say "Installing docsgpt $DOCSGPT_VERSION"
|
||||
|
||||
@@ -24,9 +24,16 @@ you. It needs Docker with Compose 2.24 or newer. The installer gets
|
||||
[uv](https://docs.astral.sh/uv/), installs the package with it and runs
|
||||
`docsgpt up`:
|
||||
|
||||
macOS and Linux:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://docs.ac/install | bash # macOS and Linux
|
||||
irm https://docs.ac/install.ps1 | iex # Windows (PowerShell)
|
||||
curl -fsSL https://docs.ac/install | bash
|
||||
```
|
||||
|
||||
Windows (PowerShell):
|
||||
|
||||
```powershell
|
||||
irm https://docs.ac/install.ps1 | iex
|
||||
```
|
||||
|
||||
Both scripts are attached to every [release](https://github.com/arc53/DocsGPT/releases)
|
||||
|
||||
@@ -34,7 +34,7 @@ The installer:
|
||||
* **Who should reach DocsGPT:** only this computer; other machines on your network (plain HTTP, with an access token); or a domain name with HTTPS (a certificate from Let's Encrypt, with an access token).
|
||||
* **Which model provider:** the DocsGPT public API (no key needed), OpenAI, Anthropic, Google Gemini, OpenRouter, Groq, or an OpenAI-compatible server such as Ollama or vLLM.
|
||||
|
||||
It then starts DocsGPT and prints its address, [http://localhost:7091](http://localhost:7091) for a local install. Settings and generated secrets are in `~/.docsgpt/server/.env`.
|
||||
It then starts DocsGPT and prints its address, [http://localhost:7091](http://localhost:7091) for a local install. Settings and generated secrets are in `~/.docsgpt/server/.env`, or `/opt/docsgpt/.env` when the installer runs as root on Linux; `docsgpt up --dir` or `DOCSGPT_HOME` choose another folder.
|
||||
|
||||
<Callout type="info">
|
||||
To read the script before running it, download it first: `curl -fsSL https://docs.ac/install -o install.sh`, then `bash install.sh`. On Windows: `irm https://docs.ac/install.ps1 -OutFile install.ps1`, then `.\install.ps1`.
|
||||
|
||||
Reference in new issue
Block a user