diff --git a/komodo/data/core/.gitkeep b/komodo/data/core/.gitkeep new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/komodo/data/core/.gitkeep @@ -0,0 +1 @@ + diff --git a/komodo/data/docker/.gitkeep b/komodo/data/docker/.gitkeep new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/komodo/data/docker/.gitkeep @@ -0,0 +1 @@ + diff --git a/komodo/data/ferretdb/.gitkeep b/komodo/data/ferretdb/.gitkeep new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/komodo/data/ferretdb/.gitkeep @@ -0,0 +1 @@ + diff --git a/komodo/data/periphery/.gitkeep b/komodo/data/periphery/.gitkeep new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/komodo/data/periphery/.gitkeep @@ -0,0 +1 @@ + diff --git a/komodo/data/postgres/.gitkeep b/komodo/data/postgres/.gitkeep new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/komodo/data/postgres/.gitkeep @@ -0,0 +1 @@ + diff --git a/komodo/docker-compose.yml b/komodo/docker-compose.yml new file mode 100644 index 000000000..b62f8ff05 --- /dev/null +++ b/komodo/docker-compose.yml @@ -0,0 +1,94 @@ +version: "3.7" + +services: + app_proxy: + environment: + APP_HOST: komodo_core_1 + APP_PORT: 9120 + + docker: + image: docker:28.3.0-dind@sha256:d33eb93fe02683e984e6f8a93c0b3d85bb74f56ec83922bc39fb34ba23ab42bc + privileged: true + network_mode: host + stop_grace_period: 1m + restart: on-failure + environment: + DOCKER_ENSURE_BRIDGE: "dind0:10.32.0.1/16" + entrypoint: /entrypoint.sh + command: > + dockerd + --bridge dind0 + --data-root /data/data + --exec-root /data/exec + --host unix:///data/docker.sock + --pidfile /data/docker.pid + volumes: + - ${APP_DATA_DIR}/entrypoint.sh:/entrypoint.sh + - ${APP_DATA_DIR}/data/docker:/data + + postgres: + image: ghcr.io/ferretdb/postgres-documentdb:17-0.104.0@sha256:1d709fc03dcb82faa2e3aa02c0f80ea10e483b38aff08a05da36a6faa2098608 + user: "1000:1000" + labels: + komodo.skip: + restart: on-failure + volumes: + - ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data + environment: + POSTGRES_USER: admin + POSTGRES_PASSWORD: admin + POSTGRES_DB: postgres + + ferretdb: + image: ghcr.io/ferretdb/ferretdb:2.3.1@sha256:1170bd36c39378614edd3f1d2b92f0c5a9b30e482a79ea0c3fc0fe11baba3afa + user: "1000:1000" + labels: + komodo.skip: + restart: on-failure + depends_on: + - postgres + volumes: + - ${APP_DATA_DIR}/data/ferretdb:/state + environment: + FERRETDB_POSTGRESQL_URL: postgres://admin:admin@komodo_postgres_1:5432/postgres + + core: + image: ghcr.io/moghtech/komodo-core:1.18.4@sha256:b9a0c8757dd9e8f77a5e541c3afd66d37c5dbb1fa4a4687a2c6146741f18850e + user: "1000:1000" + labels: + komodo.skip: + restart: on-failure + depends_on: + - ferretdb + environment: + KOMODO_DATABASE_ADDRESS: komodo_ferretdb_1:27017 + KOMODO_DATABASE_USERNAME: admin + KOMODO_DATABASE_PASSWORD: admin + KOMODO_PASSKEY: ${APP_PASSWORD} + KOMODO_FIRST_SERVER: https://komodo_periphery_1:8120 + KOMODO_JWT_SECRET: ${APP_SEED} + env_file: + - ${APP_DATA_DIR}/settings.env + volumes: + - ${APP_DATA_DIR}/data/core:/repo-cache + + periphery: + image: ghcr.io/moghtech/komodo-periphery:1.18.4@sha256:0a3ccd9294b13d3c5942d1e20392c81e28369ba1aaba6b17bfd5b35907760b98 + labels: + komodo.skip: + restart: on-failure + environment: + COMPOSE_KOMODO_IMAGE_TAG: latest + KOMODO_PASSKEY: ${APP_PASSWORD} + TZ: Europe/Berlin + PERIPHERY_ROOT_DIRECTORY: /etc/komodo + PERIPHERY_PASSKEYS: ${APP_PASSWORD} + PERIPHERY_DISABLE_TERMINALS: "false" + PERIPHERY_SSL_ENABLED: "true" + PERIPHERY_INCLUDE_DISK_MOUNTS: /etc/hostname + PERIPHERY_LOGGING_PRETTY: "false" + PERIPHERY_PRETTY_STARTUP_CONFIG: "false" + volumes: + - ${APP_DATA_DIR}/data/docker:/var/run + - /proc:/proc + - ${APP_DATA_DIR}/data/periphery:/etc/komodo diff --git a/komodo/entrypoint.sh b/komodo/entrypoint.sh new file mode 100755 index 000000000..08740545c --- /dev/null +++ b/komodo/entrypoint.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +# This hack can be removed if https://github.com/docker-library/docker/pull/444 gets merged. + +# Remove docker pidfile if it exists to ensure Docker can start up after a bad shutdown +pidfile="/var/run/docker.pid" +if [[ -f "${pidfile}" ]] +then + rm -f "${pidfile}" +fi + +# Use nftables as the backend for iptables +for command in iptables iptables-restore iptables-restore-translate iptables-save iptables-translate +do + ln -sf /sbin/xtables-nft-multi /sbin/$command +done + +# Ensure that a bridge exists with the given name +ensure_bridge_exists() { + local name="${1}" + local ip_range="${2}" + + # Check if the bridge already exists + if ip link show "${name}" &>/dev/null + then + echo "Bridge '${name}' already exists. Skipping creation." + ip addr show "${name}" + return + fi + + echo "Bridge '${name}' does not exist. Creating..." + ip link add "${name}" type bridge + ip addr add "${ip_range}" dev "${name}" + ip link set "${name}" up + + echo "Bridge '${name}' is now up with IP range '${ip_range}'." + ip addr show "${name}" +} + +if [[ "${DOCKER_ENSURE_BRIDGE}" != "" ]] +then + bridge="${DOCKER_ENSURE_BRIDGE%%:*}" + ip_range="${DOCKER_ENSURE_BRIDGE#*:}" + ensure_bridge_exists "${bridge}" "${ip_range}" +fi + +exec dockerd-entrypoint.sh $@ diff --git a/komodo/hooks/pre-start b/komodo/hooks/pre-start new file mode 100755 index 000000000..aa74d160b --- /dev/null +++ b/komodo/hooks/pre-start @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -euo pipefail + +# This scripts checks the environment file for placeholder values and replaces them with generated keys or system variables. + +APP_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")" +ENV_FILE="$APP_DIR/settings.env" + +# Check if the file exists +if [ ! -f "$ENV_FILE" ]; then + echo "Error: Environment file not found at $ENV_FILE" + exit 1 +fi + +# Check if the KOMODO_HOST value is set to "changeme" +if grep -Eq '^KOMODO_HOST= *changeme$' "$ENV_FILE"; then + echo "Placeholder value for KOMODO_HOST detected. Adding proper hostname..." + + # Replace the placeholder with the hostname + sed -i -E 's|^KOMODO_HOST= *changeme$|KOMODO_HOST="'"http://${DEVICE_DOMAIN_NAME}:9120"'"|' "$ENV_FILE" + + echo "Updated KOMODO_HOST in $ENV_FILE" +else + echo "KOMODO_HOST is already set. No changes made." +fi + +exit 0 diff --git a/komodo/settings.env b/komodo/settings.env new file mode 100644 index 000000000..bfbdd4272 --- /dev/null +++ b/komodo/settings.env @@ -0,0 +1,20 @@ +TZ="Europe/Berlin" +KOMODO_HOST=changeme +KOMODO_TITLE=Komodo +KOMODO_LOCAL_AUTH="true" +KOMODO_DISABLE_USER_REGISTRATION="false" +KOMODO_ENABLE_NEW_USERS="false" +KOMODO_DISABLE_NON_ADMIN_CREATE="false" +KOMODO_TRANSPARENT_MODE="false" +KOMODO_LOGGING_PRETTY="false" +KOMODO_PRETTY_STARTUP_CONFIG="false" +KOMODO_OIDC_ENABLED="false" +KOMODO_GITHUB_OAUTH_ENABLED="false" +KOMODO_GOOGLE_OAUTH_ENABLED="false" +KOMODO_DISABLE_CONFIRM_DIALOG="false" +KOMODO_MONITORING_INTERVAL="15-sec" +KOMODO_RESOURCE_POLL_INTERVAL="1-hr" +KOMODO_WEBHOOK_SECRET=W3bh00kS3cret!2025 +KOMODO_JWT_TTL="1-day" +#KOMODO_AWS_ACCESS_KEY_ID= +#KOMODO_AWS_SECRET_ACCESS_KEY= diff --git a/komodo/umbrel-app.yml b/komodo/umbrel-app.yml new file mode 100644 index 000000000..2ff5d0fe1 --- /dev/null +++ b/komodo/umbrel-app.yml @@ -0,0 +1,32 @@ +manifestVersion: 1.1 +id: komodo +name: Komodo +tagline: A tool to build and deploy software +category: developer +version: "1.18.4" +port: 9120 +description: >- + 🦎 Komodo is an open-source platform focused on streamlining and automating the management of servers, application builds, deployments, and containerized environments. It offers a unified interface that enables users to monitor critical system metrics such as CPU load, memory consumption, and disk usage across multiple servers, providing comprehensive operational visibility. A key feature of Komodo is its ability to manage Docker containers and Docker Compose applications, delivering real-time insights into their status, logs, and uptime. This detailed container management simplifies troubleshooting and operational oversight, making it easier for teams to maintain and optimize their deployments. + + + Built on a core-periphery architecture, Komodo consists of a central control unit that coordinates with lightweight agents running on connected hosts. This structure allows for secure and scalable communication, enabling users to execute commands remotely, trigger automated builds and deployments, and access shell sessions across their infrastructure with ease. The platform’s robust management of environment variables and secrets ensures sensitive information is handled securely and flexibly, supporting features like global variables and secret interpolation. + + + Komodo exposes extensive REST and WebSocket APIs that empower teams to automate workflows, integrate with external tools, and customize infrastructure management processes programmatically. It also supports multi-user authentication with role-based access controls and OAuth integration, ensuring secure collaboration within teams. As a powerful alternative to Portainer, Komodo consolidates monitoring, deployment, and management capabilities into a single platform, helping organizations increase efficiency, reduce manual overhead, and maintain clear oversight of their distributed environments. +developer: mogh.tech +website: https://komo.do/ +submitter: dennysubke +submission: https://github.com/getumbrel/umbrel-apps/pull/3093 +repo: https://github.com/moghtech/komodo +support: https://github.com/moghtech/komodo/issues +gallery: + - 1.jpg + - 2.jpg + - 3.jpg + - 4.jpg + - 5.jpg +releaseNotes: "" +dependencies: [] +path: "" +defaultUsername: "" +defaultPassword: ""