refactor: Remove deprecated INTERNAL_API_PORT (ultrathin monolith cleanup)

Architecture cleanup after migration to ultrathin monolith:

- Remove INTERNAL_API_PORT from .env files (was port 8002)
- Clean up bot_main.py: remove uvicorn, Thread, run_internal_api()
- Update validate.md to check /api/telegram/health instead of port 8002
- Add deprecation notices to old Windows deployment docs
- Update docs/telegram/README.md with architecture note

The Telegram internal API is now served at /api/telegram/internal/*
on the main backend port (8000/8001) instead of separate port 8002.

Also includes: menu updates, ServerLogsView improvements, script fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-04 03:56:27 +02:00
parent 1e244eefea
commit f1f6760bef
16 changed files with 96 additions and 85 deletions

View File

@@ -12,7 +12,10 @@ source "$SCRIPT_DIR/scripts/service-helpers.sh"
# Service configuration
SERVICE_NAME="Unified Backend"
PORT=8000
LOG_FILE="/tmp/unified-backend.log"
LOGS_DIR="$ROOT_DIR/logs"
LOG_FILE_STDOUT="$LOGS_DIR/backend-stdout.log"
LOG_FILE_STDERR="$LOGS_DIR/backend-stderr.log"
LOG_FILE="$LOG_FILE_STDERR" # Default for status/logs commands
BACKEND_DIR="$ROOT_DIR/backend"
VENV_DIR="$BACKEND_DIR/venv"
ENV_FILE="$BACKEND_DIR/.env"
@@ -59,11 +62,16 @@ start_backend() {
print_info "Starting unified backend on port $PORT..."
cd "$BACKEND_DIR"
# Clear old log file
> "$LOG_FILE"
# Create logs directory if it doesn't exist
mkdir -p "$LOGS_DIR"
# Clear old log files
> "$LOG_FILE_STDOUT"
> "$LOG_FILE_STDERR"
# Activate virtual environment and start uvicorn
nohup bash -c "source venv/bin/activate && uvicorn main:app --host 0.0.0.0 --port $PORT --reload" > "$LOG_FILE" 2>&1 &
# stdout → backend-stdout.log, stderr → backend-stderr.log
nohup bash -c "source venv/bin/activate && uvicorn main:app --host 0.0.0.0 --port $PORT --reload" > "$LOG_FILE_STDOUT" 2> "$LOG_FILE_STDERR" &
BACKEND_PID=$!
cd "$ROOT_DIR"