Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,12 @@ jib {
environment =
mapOf(
// Disable Spring Boot Docker Compose support when running in container
// Docker Compose integration is disabled in the container image.
// It is only useful for local development (HTTP profile) where
// the host has Docker and a compose.yaml. Inside a container,
// Docker Compose cannot start sibling containers without a
// Docker socket mount, so it must be turned off.
// The application-stdio.properties also disables it for STDIO mode.
"SPRING_DOCKER_COMPOSE_ENABLED" to "false",
)

Expand Down
7 changes: 5 additions & 2 deletions dev-docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ java -jar build/libs/solr-mcp-1.0.0-SNAPSHOT.jar
#### HTTP Mode

```bash
./gradlew bootRun --args='--spring.profiles.active=http'
PROFILES=http ./gradlew bootRun
```

Spring Boot Docker Compose will automatically start the services declared in `compose.yaml`
(Solr, ZooKeeper, and optionally LGTM for observability) before the application starts.

The server will start on http://localhost:8080

### Environment Variables
Expand Down Expand Up @@ -131,7 +134,7 @@ The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) provides

```bash
# Start the server in HTTP mode
./gradlew bootRun --args='--spring.profiles.active=http'
PROFILES=http ./gradlew bootRun

# In another terminal, start MCP Inspector
npx @modelcontextprotocol/inspector
Expand Down
4 changes: 2 additions & 2 deletions dev-docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ rm -rf .gradle

1. **Verify server is running in HTTP mode**
```bash
./gradlew bootRun --args='--spring.profiles.active=http'
PROFILES=http ./gradlew bootRun
```

2. **Check port is correct**
Expand Down Expand Up @@ -408,7 +408,7 @@ If you're still having issues:
./gradlew bootRun 2>&1 | tee server.log

# HTTP mode - Spring Boot logging
./gradlew bootRun --args='--spring.profiles.active=http'
PROFILES=http ./gradlew bootRun
```

### Solr Logs
Expand Down
10 changes: 1 addition & 9 deletions security-docs/AUTH0_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,7 @@ OAUTH2_ISSUER_URI=https://your-tenant.auth0.com/
The application must run in `http` profile to enable OAuth2 security:

```bash
# Option 1: Using environment variable
export PROFILES=http
./gradlew bootRun

# Option 2: Using Spring Boot argument
./gradlew bootRun --args='--spring.profiles.active=http'

# Option 3: Using Gradle property
./gradlew bootRun -Dspring.profiles.active=http
PROFILES=http ./gradlew bootRun
```

### Application Configuration Details
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/application-http.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ spring.main.web-application-type=servlet
spring.ai.mcp.server.type=sync
spring.ai.mcp.server.protocol=stateless
spring.ai.mcp.server.stdio=false
# Docker Compose integration: automatically start Solr and other services on bootRun.
# Spring Boot detects compose.yaml and starts declared services before the application context.
spring.docker.compose.enabled=true
# OAuth2 Security Configuration
# Configure the issuer URI for your OAuth2 authorization server
# For Auth0: https://<your-auth0-domain>/.well-known/openid-configuration
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/application-stdio.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ spring.ai.mcp.server.stdio=true
spring.autoconfigure.exclude=\
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration
# Docker Compose integration is only useful in HTTP mode for local development.
# Disable it in STDIO mode to avoid startup delays and unexpected container management.
spring.docker.compose.enabled=false