Default to localhost for workstation install

- ConnectionPanel defaults host to localhost, blank username
- Backend OLLAMA_URL defaults to localhost:11434
- Systemd service reads /etc/llm-trainer/env for overrides

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
tocmo0nlord
2026-04-12 16:18:10 -04:00
parent e312420c3d
commit e5649148f7
3 changed files with 13 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ app.add_middleware(
allow_headers=["*"],
)
OLLAMA_URL = os.getenv("OLLAMA_URL", "http://192.168.2.47:11434")
OLLAMA_URL = os.getenv("OLLAMA_URL", "http://localhost:11434")
# ──────────────────────────────────────────────────────────────────────────────

View File

@@ -4,8 +4,8 @@ import { Server, LogIn, LogOut, Key, Eye, EyeOff } from 'lucide-react'
export default function ConnectionPanel({ onConnect, setStatus }) {
const [form, setForm] = useState({
host: '192.168.2.47',
username: 'tocmo0nlord',
host: 'localhost',
username: '',
password: '',
key_path: '',
port: 22,

View File

@@ -88,6 +88,7 @@ Restart=always
RestartSec=5
StandardOutput=append:/var/log/llm-trainer/backend.log
StandardError=append:/var/log/llm-trainer/backend.log
EnvironmentFile=-/etc/llm-trainer/env
Environment=PYTHONUNBUFFERED=1
[Install]
@@ -137,6 +138,15 @@ fi
chown -R llm-trainer:llm-trainer /opt/llm-trainer
chown -R llm-trainer:llm-trainer /var/log/llm-trainer
# Write default env config (only on first install)
if [ ! -f /etc/llm-trainer/env ]; then
cat > /etc/llm-trainer/env <<'ENV'
# LLM Trainer configuration
# Override Ollama URL if it runs on a different host
OLLAMA_URL=http://localhost:11434
ENV
fi
# Build Python venv and install deps
echo "Installing Python dependencies..."
python3 -m venv /opt/llm-trainer/venv