Komodo is a powerful cluster manager that promises to revolutionize your development experience. This detailed guide will walk you through the installation and configuration of Komodo, leveraging the efficiency of Docker and the reliability of MongoDB.
mkdir komodo
wget -P komodo https://raw.githubusercontent.com/moghtech/komodo/main/compose/mongo.compose.yaml
wget -P komodo https://raw.githubusercontent.com/moghtech/komodo/main/compose/compose.env
KOMODO_DB_USERNAME: This is the username for your MongoDB database. Choose a strong and secure password. KOMODO_DB_PASSWORD: This is the password for your MongoDB database. Security is paramount; create a complex and unique password. COMPOSE_KOMODO_IMAGE_TAG: This variable specifies the version of Komodo to deploy. Leaving it as latest will use the most recent version, but it's recommended to specify a particular tag for stability and reproducibility in production environments. COMPOSE_LOGGING_DRIVER: This variable sets the logging driver used by Docker. The default is local, suitable for development and testing, but you'll likely want to configure a more robust logging solution for production environments.
docker compose -p komodo -f komodo/mongo.compose.yaml --env-file komodo/compose.env up -d
################################
# 🦎 KOMODO COMPOSE - MONGO 🦎 #
################################
# This compose file defines the services for a Komodo cluster using MongoDB.
services:
mongo: # Define the MongoDB service
image: mongo # Use the official MongoDB Docker image
labels:
komodo.skip: # Prevent Komodo from automatically stopping this container
command: --quiet --wiredTigerCacheSizeGB 0.25 # Configure MongoDB settings
restart: unless-stopped # Automatically restart the MongoDB container unless manually stopped
logging:
driver: ${COMPOSE_LOGGING_DRIVER:-local} # Configure logging driver (default: local)
networks:
- default # Network configuration
volumes: # Define volumes for persistent data storage
- mongo-data:/data/db
- mongo-config:/data/configdb
environment: # MongoDB environment variables
MONGO_INITDB_ROOT_USERNAME: ${KOMODO_DB_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${KOMODO_DB_PASSWORD}
core: # Define the Komodo Core service
image: ghcr.io/mbecker20/komodo:${COMPOSE_KOMODO_IMAGE_TAG:-latest} # Use the Komodo Core image
labels:
komodo.skip: # Prevent Komodo from automatically stopping this container
restart: unless-stopped # Automatically restart the container unless manually stopped
depends_on:
- mongo # Ensure MongoDB is running before starting Komodo Core
logging:
driver: ${COMPOSE_LOGGING_DRIVER:-local} # Configure logging driver (default: local)
networks:
- default # Network configuration
ports:
- 9120:9120 # Map port 9120 on the host to port 9120 in the container
env_file: ./compose.env # Load environment variables from compose.env
environment: # Environment variables for Komodo Core
KOMODO_DATABASE_ADDRESS: mongo:27017 # MongoDB connection string
KOMODO_DATABASE_USERNAME: ${KOMODO_DB_USERNAME} # MongoDB username
KOMODO_DATABASE_PASSWORD: ${KOMODO_DB_PASSWORD} # MongoDB password
volumes: # Define volumes for persistent data storage
- repo-cache:/repo-cache # Cache for repositories
periphery: # Define the Komodo Periphery service
# ... [Similar configuration as for the Core service] ...
0 comments:
Post a Comment