Skip to main content

Overview

Docker Compose provides the fastest way to get MCP Platform running locally for development, testing, or small-scale production deployments.
For production environments with high availability requirements, consider the Terraform deployment for AWS infrastructure.

Quick Start

Get MCP Platform running in 3 minutes:
# Clone the repository
git clone https://github.com/yourusername/runlayer-mcp-gateway.git
cd runlayer-mcp-gateway

# Configure environment
cp .env.example .env
cp webapp/.env.example webapp/.env

# Start all services
docker compose up -d

# Check status
docker compose ps
Access the application:

Prerequisites

System Requirements

  • CPU: 2+ cores - RAM: 4GB+ - Storage: 10GB+ free space - OS: Linux, macOS, or Windows

Software Requirements

  • Docker: Latest version - Docker Compose: v2.0+ - Git: For cloning the repository

Install Docker

  • macOS
  • Linux
  • Windows
# Install Docker Desktop
brew install --cask docker

# Start Docker Desktop
open -a Docker
Verify installation:
docker --version
docker compose version
docker run hello-world

Configuration

Environment Variables

The .env.example file contains all necessary configuration. Key variables are in the “REQUIRED CONFIGURATION” section.

Generate Secure Values

# Generate secure passwords (recommended)
echo "POSTGRES_PASSWORD=$(openssl rand -base64 32)" >> .env
echo "REDIS_PASSWORD=$(openssl rand -base64 32)" >> .env
echo "SECRET_KEY=$(openssl rand -base64 32)" >> .env
echo "MASTER_SALT=$(openssl rand -base64 32)" >> .env

Services

Your deployment includes these services:

PostgreSQL Database

Image: postgres:12 Volume: Persistent data storage

Redis Cache

Image: redis:7-alpine Purpose: Session storage and caching

Backend API

Build: ./backend Features: FastAPI with auto-reload

Frontend Web App

Build: ./webapp Features: React with hot reloading

Reverse Proxy

Image: nginx:1.25-alpine Port: 3000 Purpose: Routes requests to the backend and frontend services

Deployment Steps

1

Clone and Setup

git clone https://github.com/yourusername/runlayer-mcp-gateway.git
cd runlayer-mcp-gateway
cp .env.example .env
cp webapp/.env.example webapp/.env
2

Start Services

# Start all services
docker compose up -d

# View logs
docker compose logs -f
First startup takes a few minutes to download images and initialize the database.
3

Verify Deployment

# Check service status
docker compose ps

# Test health endpoint
curl http://localhost:3000/api/v1/utils/health-check/
4

Access Application

  • Open http://localhost:3000 in your browser
  • Login with credentials from your .env file
  • Explore the platform interface

Common Commands

# All services
docker compose logs -f

# Specific service

docker compose logs backend
docker compose logs webapp

# Restart all
docker compose restart

# Restart specific service
docker compose restart backend

# Full restart
docker compose down && docker compose up -d
# Direct command line access

docker compose exec db psql -U postgres -d app

# Stop services
docker compose down

# Remove volumes (WARNING: deletes data)
docker compose down -v

# Clean up Docker system
docker system prune

Production Considerations

Reverse Proxy

The included Nginx proxy acts as the main entry point for the application. It handles routing between the frontend and backend services. For production, you should consider configuring SSL certificates and domain names.

Monitoring

Basic monitoring is included. Check service health:
# Service status
docker compose ps

# Resource usage
docker stats

# Health checks
curl http://localhost:3000/api/v1/utils/health-check/

Troubleshooting

Error: Database connection failedSolution:
# Check PostgreSQL status
docker compose exec db pg_isready -U postgres

# View database logs
docker compose logs db

# Reset database
docker compose down -v && docker compose up -d
Error: Build failsSolution:
# Clean build
docker compose build --no-cache

# Pull latest images
docker compose pull
Error: Permission deniedSolution:
# Add user to docker group
sudo usermod -aG docker $USER
newgrp docker

Next Steps