diff --git a/apps/erp-integration/config.json b/apps/erp-integration/config.json index 8214dbc..2ae264d 100644 --- a/apps/erp-integration/config.json +++ b/apps/erp-integration/config.json @@ -58,19 +58,36 @@ }, { "type": "text", - "label": "MCP API Base URL", - "hint": "Base URL for the MCP API server", + "label": "Ollama Base URL", + "hint": "Local Ollama API endpoint (e.g. http://192.168.0.32:11434/v1). Leave empty to use Anthropic.", "required": false, - "default": "http://localhost:2009", - "env_variable": "MCP_API_BASE_URL" + "default": "", + "env_variable": "OLLAMA_BASE_URL" }, { "type": "text", - "label": "SharePoint Base URL", - "hint": "SharePoint/OneDrive URL for Integration Planning documents", + "label": "Ollama Model", + "hint": "Ollama model name (e.g. gpt-oss:20b)", "required": false, - "default": "https://minicircuits-my.sharepoint.com/personal/alex_zaw_minicircuits_com1/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Falex%5Fzaw%5Fminicircuits%5Fcom1%2FDocuments%2FIntegration%20Planning%2F", - "env_variable": "SHAREPOINT_BASE_URL" + "default": "gpt-oss:20b", + "env_variable": "OLLAMA_MODEL" + }, + { + "type": "password", + "label": "Ollama API Key", + "hint": "API key for authenticated Ollama proxy access (X-Api-Key header)", + "required": false, + "env_variable": "OLLAMA_API_KEY", + "min": 0, + "max": 200 + }, + { + "type": "text", + "label": "Context Root", + "hint": "Optional URL prefix for all routes (e.g. /everest). Leave empty for no prefix.", + "required": false, + "default": "", + "env_variable": "CONTEXT_ROOT" } ] } diff --git a/apps/erp-integration/docker-compose.json b/apps/erp-integration/docker-compose.json index 9641496..f74ee01 100644 --- a/apps/erp-integration/docker-compose.json +++ b/apps/erp-integration/docker-compose.json @@ -37,12 +37,20 @@ "value": "8001" }, { - "key": "MCP_API_BASE_URL", - "value": "${MCP_API_BASE_URL}" + "key": "OLLAMA_BASE_URL", + "value": "${OLLAMA_BASE_URL}" }, { - "key": "SHAREPOINT_BASE_URL", - "value": "${SHAREPOINT_BASE_URL}" + "key": "OLLAMA_MODEL", + "value": "${OLLAMA_MODEL}" + }, + { + "key": "OLLAMA_API_KEY", + "value": "${OLLAMA_API_KEY}" + }, + { + "key": "CONTEXT_ROOT", + "value": "${CONTEXT_ROOT}" } ], "volumes": [ @@ -58,17 +66,11 @@ } ], "healthCheck": { - "test": "curl --fail http://localhost:8001/api/health || exit 1", + "test": "curl --fail http://localhost:8001${CONTEXT_ROOT}/api/health || exit 1", "interval": "30s", "timeout": "10s", "retries": 3 - }, - "addPorts": [ - { - "containerPort": 8001, - "hostPort": 8001 - } - ] + } } ] } diff --git a/apps/erp-integration/docker-compose.yml b/apps/erp-integration/docker-compose.yml new file mode 100644 index 0000000..e7b2af1 --- /dev/null +++ b/apps/erp-integration/docker-compose.yml @@ -0,0 +1,32 @@ +x-runtipi: + schema_version: 2 +services: + erp-integration: + image: git.alexzaw.dev/alexz/erp-integration:latest + ports: + - 8001:8001 + volumes: + - ${APP_DATA_DIR}/data:/app/backend/data + - ${APP_DATA_DIR}/uploads:/app/backend/uploads + environment: + - TZ=${TZ} + - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} + - ANTHROPIC_MODEL=${ANTHROPIC_MODEL} + - AGENT_CHAT_ENABLED=${AGENT_CHAT_ENABLED} + - CORS_ORIGIN=${CORS_ORIGIN} + - NODE_ENV=production + - PORT=8001 + - MCP_API_BASE_URL=${MCP_API_BASE_URL} + - SHAREPOINT_BASE_URL=${SHAREPOINT_BASE_URL} + - OLLAMA_BASE_URL=${OLLAMA_BASE_URL} + - OLLAMA_MODEL=${OLLAMA_MODEL} + - OLLAMA_API_KEY=${OLLAMA_API_KEY} + - CONTEXT_ROOT=${CONTEXT_ROOT} + healthcheck: + test: curl --fail http://localhost:8001$${CONTEXT_ROOT}/api/health || exit 1 + interval: 30s + timeout: 10s + retries: 3 + x-runtipi: + internal_port: 8001 + is_main: true