This commit is contained in:
2025-08-20 05:36:39 +02:00
parent bdfcbb9ea1
commit 672c1878da
3 changed files with 24 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# Herolib Web Server Installation Script
# KnowledgeCenter Web Server Installation Script
# This script sets up the necessary environment for the Flask web server.
set -e # Exit on any error
@@ -16,7 +16,7 @@ NC='\033[0m' # No Color
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
echo -e "${BLUE}🔧 Setting up Herolib Web Server Environment${NC}"
echo -e "${BLUE}🔧 Setting up KnowledgeCenter Web Server Environment${NC}"
echo "=================================================="
# Check if uv is installed
@@ -39,5 +39,20 @@ fi
# Sync dependencies
echo -e "${YELLOW}📦 Installing dependencies with uv...${NC}"
uv sync
if [ -d "$HOME/code/git.ourworld.tf/herocode/herolib_python/herolib" ]; then
echo -e "${GREEN}✅ Found local herolib, installing...${NC}"
uv pip install -e "$HOME/code/git.ourworld.tf/herocode/herolib_python"
else
echo -e "${YELLOW}📦 Local herolib not found, installing from git...${NC}"
uv pip install herolib@git+https://git.ourworld.tf/herocode/herolib_python.git --force-reinstall --no-cache-dir
fi
echo -e "${GREEN}✅ Dependencies installed${NC}"
# Create necessary directories
mkdir -p static/css static/js static/images
mkdir -p templates
mkdir -p md
echo -e "${GREEN}✅ Directory structure verified${NC}"
echo -e "${GREEN}🎉 Installation complete! You can now run start_server.sh${NC}"