From 095585c168f9d9c33b15739f62f1c8c7c58f332c Mon Sep 17 00:00:00 2001 From: Kostis Trantzas Date: Thu, 22 Jan 2026 13:22:50 +0000 Subject: [PATCH 1/2] Adding MCP Backend to docker compose artifacts (fix for #61) --- compose/docker-compose.yaml.configure | 58 ++++++++++++++++++++++++++- compose/nginx/nginx.conf.default | 8 ++++ 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/compose/docker-compose.yaml.configure b/compose/docker-compose.yaml.configure index 905739d..ece8dd9 100644 --- a/compose/docker-compose.yaml.configure +++ b/compose/docker-compose.yaml.configure @@ -387,7 +387,7 @@ services: oslmcp: container_name: openslice-mcp restart: always - profiles: ["prod"] + profiles: ["prod", "mcp-server", "mcp"] build: context: ../../org.etsi.osl.mcp.server/ dockerfile: Dockerfile @@ -416,12 +416,66 @@ services: logging: driver: "json-file" options: - max-size: "500m" + max-size: "250m" max-file: "2" networks: - front - back + + + oslmcpbackend: + container_name: openslice-mcp-backend + restart: always + profiles: ["prod", "mcp-backend", "mcp"] + build: + context: ../../org.etsi.osl.mcp.backend/ + dockerfile: Dockerfile + image: labs.etsi.org:5050/osl/code/org.etsi.osl.mcp.backend:develop + ports: + - "11880:11880" + environment: + SPRING_APPLICATION_JSON: '{ + "server.forward-headers-strategy":"FRAMEWORK" + }' + + SERVER_PORT: 11880 + SPRING_APPLICATION_NAME: osl-mcp-backend + + # AI Configuration + SPRING_AI_OLLAMA_BASE_URL: http://ollama:11434 # Change the Ollama API here + SPRING_AI_OLLAMA_CHAT_MODEL: mygpt:20b # Change the used model here + SPRING_AI_OLLAMA_CHAT_TEMPERATURE: 0.5 + SPRING_AI_CHAT_SYSTEM_PROMPT: "You are an OpenSlice AI Assistant." # Customize your initial Assistant prompt + SPRING_AI_CHAT_MAX_MESSAGES: 100 + + # MCP Client Configuration + SPRING_AI_MCP_CLIENT_TYPE: SYNC + SPRING_AI_MCP_CLIENT_STREAMABLE_HTTP_CONNECTIONS_OPENSLICE_SERVER_URL: http://openslice-mcp:13015/sse + + # OAuth2/Keycloak Configuration + SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI: http://keycloak:8080/auth/realms/openslice + SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_KEYCLOAK_ISSUER_URI: http://keycloak:8080/auth/realms/openslice + SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_CLIENT_ID: osapiWebClientId + + # ActiveMQ Configuration + SPRING_ACTIVEMQ_BROKER_URL: tcp://anartemis:61616?jms.watchTopicAdvisories=false + SPRING_ACTIVEMQ_USER: artemis + SPRING_ACTIVEMQ_PASSWORD: artemis + + # Logging Configuration + LOGGING_LEVEL_ROOT: INFO + LOGGING_LEVEL_OSL: INFO + LOGGING_LEVEL_SPRING_AI: INFO + logging: + driver: "json-file" + options: + max-size: "250m" + max-file: "2" + networks: + - back + - front + portainer: container_name: portainer image: portainer/portainer-ce:2.18.4 diff --git a/compose/nginx/nginx.conf.default b/compose/nginx/nginx.conf.default index c2478c4..7e72ecd 100644 --- a/compose/nginx/nginx.conf.default +++ b/compose/nginx/nginx.conf.default @@ -98,6 +98,14 @@ http { # proxy_set_header X-Forwarded-Proto $scheme; # proxy_set_header X-Forwarded-Port 443; # } + + location /ask { + proxy_pass http://oslmcpbackend:11880/ask; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto $scheme; + } } -- GitLab From c4255d3f4770672700f5250b8c61099f0fae0b5a Mon Sep 17 00:00:00 2001 From: Kostis Trantzas Date: Thu, 22 Jan 2026 15:10:36 +0000 Subject: [PATCH 2/2] changing default model name at MCP backend service --- compose/docker-compose.yaml.configure | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compose/docker-compose.yaml.configure b/compose/docker-compose.yaml.configure index ece8dd9..0804ae3 100644 --- a/compose/docker-compose.yaml.configure +++ b/compose/docker-compose.yaml.configure @@ -86,8 +86,8 @@ services: logging: driver: "json-file" options: - max-size: "200m" - max-file: "5" + max-size: "400m" + max-file: "3" ports: - 8080:8080 - 8443:8443 @@ -164,7 +164,7 @@ services: logging: driver: "json-file" options: - max-size: "800m" + max-size: "500m" max-file: "3" ports: - 13011:13011 @@ -239,7 +239,7 @@ services: driver: "json-file" options: max-size: "1g" - max-file: "3" + max-file: "2" volumes: - ./repo:/root ports: @@ -272,7 +272,7 @@ services: driver: "json-file" options: max-size: "1g" - max-file: "3" + max-file: "2" ports: - 13100:13100 networks: @@ -443,7 +443,7 @@ services: # AI Configuration SPRING_AI_OLLAMA_BASE_URL: http://ollama:11434 # Change the Ollama API here - SPRING_AI_OLLAMA_CHAT_MODEL: mygpt:20b # Change the used model here + SPRING_AI_OLLAMA_CHAT_MODEL: gpt-oss:20b # Change the used model here SPRING_AI_OLLAMA_CHAT_TEMPERATURE: 0.5 SPRING_AI_CHAT_SYSTEM_PROMPT: "You are an OpenSlice AI Assistant." # Customize your initial Assistant prompt SPRING_AI_CHAT_MAX_MESSAGES: 100 @@ -533,7 +533,7 @@ services: driver: "json-file" options: max-size: "500m" - max-file: "3" + max-file: "2" ports: - "8000:8000" networks: -- GitLab