fix : docker on windows

This commit is contained in:
martin
2025-06-14 00:30:14 +02:00
parent 01a27c10ad
commit a6cf09673b
5 changed files with 14 additions and 13 deletions
+1
View File
@@ -3,6 +3,7 @@ REDIS_BASE_URL="redis://redis:6379/0"
WORK_DIR="/Users/username/Documents/workspace_with_my_files" WORK_DIR="/Users/username/Documents/workspace_with_my_files"
OLLAMA_PORT="11434" OLLAMA_PORT="11434"
LM_STUDIO_PORT="1234" LM_STUDIO_PORT="1234"
BACKEND_PORT="7777"
CUSTOM_ADDITIONAL_LLM_PORT="11435" CUSTOM_ADDITIONAL_LLM_PORT="11435"
OPENAI_API_KEY='xxxxx' OPENAI_API_KEY='xxxxx'
DEEPSEEK_API_KEY='xxxxx' DEEPSEEK_API_KEY='xxxxx'
+2 -2
View File
@@ -255,5 +255,5 @@ if __name__ == "__main__":
if envport: if envport:
port = int(envport) port = int(envport)
else: else:
port = 8000 port = 7777
uvicorn.run(api, host="0.0.0.0", port=8000) uvicorn.run(api, host="0.0.0.0", port=7777)
+4 -2
View File
@@ -65,7 +65,7 @@ services:
environment: environment:
- NODE_ENV=development - NODE_ENV=development
- CHOKIDAR_USEPOLLING=true - CHOKIDAR_USEPOLLING=true
- REACT_APP_BACKEND_URL=http://0.0.0.0:${BACKEND_PORT:-8000} - REACT_APP_BACKEND_URL=http://host.docker.internal:${BACKEND_PORT:-7777}
networks: networks:
- agentic-seek-net - agentic-seek-net
@@ -88,6 +88,7 @@ services:
- SEARXNG_URL=${SEARXNG_BASE_URL:-http://searxng:8080} - SEARXNG_URL=${SEARXNG_BASE_URL:-http://searxng:8080}
- REDIS_URL=${REDIS_BASE_URL:-redis://redis:6379/0} - REDIS_URL=${REDIS_BASE_URL:-redis://redis:6379/0}
- WORK_DIR=/opt/workspace - WORK_DIR=/opt/workspace
- BACKEND_PORT=${BACKEND_PORT}
- OPENAI_API_KEY=${OPENAI_API_KEY} - OPENAI_API_KEY=${OPENAI_API_KEY}
- DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY} - DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY}
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY} - OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
@@ -96,7 +97,8 @@ services:
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- HUGGINGFACE_API_KEY=${HUGGINGFACE_API_KEY} - HUGGINGFACE_API_KEY=${HUGGINGFACE_API_KEY}
- DSK_DEEPSEEK_API_KEY=${DSK_DEEPSEEK_API_KEY} - DSK_DEEPSEEK_API_KEY=${DSK_DEEPSEEK_API_KEY}
network_mode: "host" networks:
- agentic-seek-net
volumes: volumes:
redis-data: redis-data:
+1 -1
View File
@@ -4,7 +4,7 @@ import axios from 'axios';
import './App.css'; import './App.css';
import { colors } from './colors'; import { colors } from './colors';
const BACKEND_URL = process.env.BACKEND_PORT || 'http://0.0.0.0:8000'; const BACKEND_URL = process.env.REACT_APP_BACKEND_URL || 'http://localhost:7777';
function App() { function App() {
const [query, setQuery] = useState(''); const [query, setQuery] = useState('');
+6 -8
View File
@@ -3,26 +3,24 @@
if "%1"=="full" ( if "%1"=="full" (
echo Starting full deployment... echo Starting full deployment...
) else ( ) else (
echo Starting partial deployment... (backend run on host), use "full" to run all services in containers set "msg=Starting partial deployment... (backend run on host), use "full" to run all services in containers"
echo !msg!
) )
where openssl >nul 2>&1 where openssl >nul 2>&1
if %ERRORLEVEL% == 0 ( if %ERRORLEVEL% == 0 (
for /f %%i in ('openssl rand -hex 32') do set SEARXNG_SECRET_KEY=%%i for /f %%i in ('openssl rand -hex 32') do set SEARXNG_SECRET_KEY=%%i
) else ( ) else (
where python3 >nul 2>&1 where python >nul 2>&1
if %ERRORLEVEL% == 0 ( if %ERRORLEVEL% == 0 (
for /f %%i in ('python3 -c "import secrets; print(secrets.token_hex(32))"') do set SEARXNG_SECRET_KEY=%%i for /f %%i in ('python -c "import secrets; print(secrets.token_hex(32))"') do set SEARXNG_SECRET_KEY=%%i
) else ( ) else (
echo Error: Neither openssl nor python is available to generate a secret key. echo Error: Neither openssl nor python is available to generate a secret key.
exit /b 1 exit /b 2
) )
) )
REM Stop all containers
echo Stopping containers...
docker stop $(docker ps -aq) >nul 2>&1
REM Generate secret key REM Generate secret key
for /f %%i in ('powershell -command "[System.Web.Security.Membership]::GeneratePassword(64,0)"') do set SEARXNG_SECRET_KEY=%%i for /f %%i in ('powershell -command "[System.Web.Security.Membership]::GeneratePassword(64,0)"') do set SEARXNG_SECRET_KEY=%%i