Running the application in a production environment requires a secure, consistent, and automated approach. Unlike development setups, production deployments must ensure scalability and compliance with security best practices. This includes using hardened configurations, externalizing secrets, and managing container lifecycle effectively.

This topic explains the recommended methods for running the application in a production environment. It provides options for using the helper script, Docker Compose, or a container orchestrator such as Kubernetes.

Option A: Use the run.sh script (recommended)

The exported production bundle includes a run.sh helper script that simplifies deployment and lifecycle management. This script ensures consistent commands and applies environment overrides automatically.

The following code block shows how to use the run.sh script on a production host:
# On production host with exported bundle
./run.sh start    # Start the server
./run.sh stop     # Stop the server
./run.sh restart  # Restart the server
./run.sh logs     # View logs
The run.sh script automatically:
  • Loads the correct Docker Compose configuration
  • Applies environment variable overrides
  • Manages container lifecycle
  • Provides consistent deployment commands

Option B: Use Docker Compose directly

You can run the application using Docker Compose commands. The following command starts the application using the exported Docker Compose file:
docker compose -f docker-compose.mcp.yml up -d

Option C: Use a container orchestrator (Kubernetes)

For large-scale or cloud deployments, you can convert the Docker Compose configuration into Kubernetes manifests. This approach provides better scalability and orchestration features. The following guidelines apply when deploying with Kubernetes:
  • Convert the Docker Compose configuration into a Deployment and Service.
  • Mount configuration files and certificate secrets as read-only volumes.
  • Configure a readiness probe that checks /http/health if exposed, or run a lightweight tool invocation for health checks.