Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# Copy this file to .env and update with your actual values
# Never commit real credentials to version control

# =============================================================================
# DOCKER CONFIGURATION
# =============================================================================
APP_HOME=/opt

# =============================================================================
# REGISTRY CONFIGURATION
# =============================================================================
Expand Down
24 changes: 12 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ services:
- "443:443"
- "7860:7860"
volumes:
- ${HOME}/mcp-gateway/servers:/app/registry/servers
- ${HOME}/mcp-gateway/models:/app/registry/models
- ${HOME}/mcp-gateway/logs:/app/logs
- ${HOME}/mcp-gateway/auth_server/scopes.yml:/app/auth_server/scopes.yml
- ${HOME}/mcp-gateway/ssl:/etc/ssl:ro
- ${APP_HOME}/mcp-gateway/servers:/app/registry/servers
- ${APP_HOME}/mcp-gateway/models:/app/registry/models
- ${APP_HOME}/mcp-gateway/logs:/app/logs
- ${APP_HOME}/mcp-gateway/auth_server/scopes.yml:/app/auth_server/scopes.yml
- ${APP_HOME}/mcp-gateway/ssl:/etc/ssl:ro
depends_on:
- auth-server
- metrics-service
Expand Down Expand Up @@ -71,7 +71,7 @@ services:
- "9465:9465" # Prometheus metrics endpoint
volumes:
- metrics-db-data:/var/lib/sqlite
- ${HOME}/mcp-gateway/logs:/app/logs
- ${APP_HOME}/mcp-gateway/logs:/app/logs
depends_on:
- metrics-db
restart: unless-stopped
Expand Down Expand Up @@ -116,8 +116,8 @@ services:
ports:
- "8888:8888"
volumes:
- ${HOME}/mcp-gateway/logs:/app/logs
- ${HOME}/mcp-gateway/auth_server/scopes.yml:/app/scopes.yml
- ${APP_HOME}/mcp-gateway/logs:/app/logs
- ${APP_HOME}/mcp-gateway/auth_server/scopes.yml:/app/scopes.yml
restart: unless-stopped

# Current Time MCP Server
Expand Down Expand Up @@ -145,7 +145,7 @@ services:
- PORT=8001
- SECRET_KEY=${SECRET_KEY}
volumes:
- ${HOME}/mcp-gateway/secrets/fininfo/:/app/fininfo/
- ${APP_HOME}/mcp-gateway/secrets/fininfo/:/app/fininfo/
ports:
- "8001:8001"
restart: unless-stopped
Expand All @@ -163,9 +163,9 @@ services:
- REGISTRY_USERNAME=${ADMIN_USER:-admin}
- REGISTRY_PASSWORD=${ADMIN_PASSWORD}
volumes:
- ${HOME}/mcp-gateway/servers:/app/registry/servers
- ${HOME}/mcp-gateway/models:/app/registry/models
- ${HOME}/mcp-gateway/auth_server/scopes.yml:/app/auth_server/scopes.yml
- ${APP_HOME}/mcp-gateway/servers:/app/registry/servers
- ${APP_HOME}/mcp-gateway/models:/app/registry/models
- ${APP_HOME}/mcp-gateway/auth_server/scopes.yml:/app/auth_server/scopes.yml
ports:
- "8003:8003"
depends_on:
Expand Down
8 changes: 7 additions & 1 deletion registry/core/nginx_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ async def generate_config_async(self, servers: Dict[str, Dict[str, Any]]) -> boo

# Replace placeholders in template
config_content = template_content.replace("{{LOCATION_BLOCKS}}", "\n".join(location_blocks))
config_content = config_content.replace("{{EC2_PUBLIC_DNS}}", ec2_public_dns)
# Only include EC2_PUBLIC_DNS in server_name if it exists
if ec2_public_dns:
config_content = config_content.replace("{{EC2_PUBLIC_DNS}}", ec2_public_dns)
else:
# Remove the placeholder entirely if EC2_PUBLIC_DNS is empty
config_content = config_content.replace(" {{EC2_PUBLIC_DNS}}", "")
config_content = config_content.replace("{{EC2_PUBLIC_DNS}}", "")

# Write config file
with open(settings.nginx_config_path, "w") as f:
Expand Down
Loading