Files
HomeDash/build.sh
JianFeeeee 0fe13fc90b feat: unified nav portal - Dashy + SearXNG + history sync + admin UI + browser extensions
- Single Docker container with nginx reverse proxy
- SearXNG search proxy with configurable proxy support
- Browser extensions (Chrome MV3 + Firefox MV2) with SSE-style history sync
- Admin WebUI for managing navigation items
- Full deployment tutorial including auth reverse proxy and webui4frpc tunnel
- Sanitized conf.yml for public distribution
- Fixed SearXNG search trailing-slash issue via nginx rewrite
- Fixed SearXNG proxy configuration for China network access
- Fixed SearXNG engine loading (removed broken keep_only, use default_settings)
2026-09-09 09:52:33 +08:00

38 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Build script with large-context handling and proxy support
# Usage: ./build.sh [--proxy=http://host:port] [--clean]
set -euo pipefail
PROXY="${HTTP_PROXY:-}"
CLEAN="${CLEAN:-false}"
while [[ $# -gt 0 ]]; do
case $1 in
--proxy) PROXY="$2"; shift 2;;
--clean) CLEAN="true"; shift;;
*) echo "Unknown option: $1"; exit 1;;
esac
done
# Large context: use --build-arg to pass proxy into build
BUILD_ARGS=""
if [[ -n "$PROXY" ]]; then
BUILD_ARGS="--build-arg HTTP_PROXY=$PROXY --build-arg HTTPS_PROXY=$PROXY --build-arg PIP_PROXY=$PROXY"
fi
echo "=== Building with args: $BUILD_ARGS ==="
docker build $BUILD_ARGS -t jianf-navi:latest \
--build-arg CONTEXT_LIMIT=1000 \
.
if [[ "$CLEAN" == "true" ]]; then
echo "=== Cleaning old layers ==="
docker system prune -a --force --filter "label=jianf-navi" 2>/dev/null || true
fi
echo "=== Push to Gitea (after testing) ==="
echo "Image: jianf-navi:latest"
echo "Size: $(docker images jianf-navi:latest --format '{{.Size}}')"
echo "Build done. Run 'docker push' when ready."