From 743f4b1a15c59d1ff4b13367831ac5275a63c4f1 Mon Sep 17 00:00:00 2001 From: rebel onion <87634197+rebelonion@users.noreply.github.com> Date: Sat, 14 Jun 2025 14:14:21 -0500 Subject: [PATCH] add admin docker --- admin-docker/grafana/compose.yaml | 10 ++++ admin-docker/influxdb/compose.yaml | 11 +++++ admin-docker/komodo/compose.yaml | 74 ++++++++++++++++++++++++++++++ admin-docker/telegraf/compose.yaml | 10 ++++ komodo-periphery/compose.yaml | 2 +- 5 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 admin-docker/grafana/compose.yaml create mode 100644 admin-docker/influxdb/compose.yaml create mode 100644 admin-docker/komodo/compose.yaml create mode 100644 admin-docker/telegraf/compose.yaml diff --git a/admin-docker/grafana/compose.yaml b/admin-docker/grafana/compose.yaml new file mode 100644 index 0000000..7530d51 --- /dev/null +++ b/admin-docker/grafana/compose.yaml @@ -0,0 +1,10 @@ +services: + grafana: + image: grafana/grafana:latest + container_name: grafana + ports: + - 3000:3000 + volumes: + - /root/docker/grafana:/var/lib/grafana + restart: always + user: "0:0" diff --git a/admin-docker/influxdb/compose.yaml b/admin-docker/influxdb/compose.yaml new file mode 100644 index 0000000..5d8bc11 --- /dev/null +++ b/admin-docker/influxdb/compose.yaml @@ -0,0 +1,11 @@ +services: + influxdb: + image: influxdb + container_name: influxdb + ports: + - 8086:8086 + volumes: + - /root/docker/influxdb/data:/var/lib/influxdb2 + - /root/docker/influxdb/config:/etc/influxdb2 + restart: always + diff --git a/admin-docker/komodo/compose.yaml b/admin-docker/komodo/compose.yaml new file mode 100644 index 0000000..b2d26ef --- /dev/null +++ b/admin-docker/komodo/compose.yaml @@ -0,0 +1,74 @@ +services: + mongo: + image: mongo + labels: + komodo.skip: # Prevent Komodo from stopping with StopAllContainers + command: --quiet --wiredTigerCacheSizeGB 0.25 + restart: unless-stopped + logging: + driver: ${COMPOSE_LOGGING_DRIVER:-local} + # ports: + # - 27017:27017 + volumes: + - mongo-data:/data/db + - mongo-config:/data/configdb + environment: + MONGO_INITDB_ROOT_USERNAME: ${KOMODO_DB_USERNAME} + MONGO_INITDB_ROOT_PASSWORD: ${KOMODO_DB_PASSWORD} + + core: + image: ghcr.io/moghtech/komodo-core:${COMPOSE_KOMODO_IMAGE_TAG:-latest} + labels: + komodo.skip: # Prevent Komodo from stopping with StopAllContainers + restart: unless-stopped + depends_on: + - mongo + logging: + driver: ${COMPOSE_LOGGING_DRIVER:-local} + ports: + - 9120:9120 + env_file: /root/docker/komodo/compose.env + environment: + KOMODO_DATABASE_ADDRESS: mongo:27017 + KOMODO_DATABASE_USERNAME: ${KOMODO_DB_USERNAME} + KOMODO_DATABASE_PASSWORD: ${KOMODO_DB_PASSWORD} + volumes: + ## Core cache for repos for latest commit hash / contents + - repo-cache:/repo-cache + ## Store sync files on server + # - /path/to/syncs:/syncs + ## Optionally mount a custom core.config.toml + # - /path/to/core.config.toml:/config/config.toml + ## Allows for systemd Periphery connection at + ## "http://host.docker.internal:8120" + # extra_hosts: + # - host.docker.internal:host-gateway + + ## Deploy Periphery container using this block, + ## or deploy the Periphery binary with systemd using + ## https://github.com/moghtech/komodo/tree/main/scripts + periphery: + image: ghcr.io/moghtech/komodo-periphery:${COMPOSE_KOMODO_IMAGE_TAG:-latest} + labels: + komodo.skip: # Prevent Komodo from stopping with StopAllContainers + restart: unless-stopped + logging: + driver: ${COMPOSE_LOGGING_DRIVER:-local} + env_file: /root/docker/komodo/compose.env + volumes: + ## Mount external docker socket + - /var/run/docker.sock:/var/run/docker.sock + ## Allow Periphery to see processes outside of container + - /proc:/proc + ## Specify the Periphery agent root directory. + ## Must be the same inside and outside the container, + ## or docker will get confused. See https://github.com/moghtech/komodo/discussions/180. + ## Default: /etc/komodo. + - ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo}:${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo} + +volumes: + # Mongo + mongo-data: + mongo-config: + # Core + repo-cache: diff --git a/admin-docker/telegraf/compose.yaml b/admin-docker/telegraf/compose.yaml new file mode 100644 index 0000000..e68ba69 --- /dev/null +++ b/admin-docker/telegraf/compose.yaml @@ -0,0 +1,10 @@ +services: + telegraf: + image: telegraf:latest + container_name: telegraf + restart: always + volumes: + - /root/docker/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro + - /var/run/docker.sock:/var/run/docker.sock:ro + user: "telegraf:996" + diff --git a/komodo-periphery/compose.yaml b/komodo-periphery/compose.yaml index 0652f6a..baa9b69 100644 --- a/komodo-periphery/compose.yaml +++ b/komodo-periphery/compose.yaml @@ -9,7 +9,7 @@ services: PERIPHERY_ROOT_DIRECTORY: ${PERIPHERY_ROOT_DIRECTORY:-/etc/komodo} ## Pass the same passkey as used by the Komodo Core connecting to this Periphery agent. PERIPHERY_PASSKEYS: ${PERIPHERY_PASSKEYS} - PERIPHERY_ALLOWED_IPS: ${PERIPHERY_ALLOWED_IPS:-0.0.0.0/0} + PERIPHERY_ALLOWED_IPS: ${PERIPHERY_ALLOWED_IPS:-127.0.0.1} ## Make server run over https PERIPHERY_SSL_ENABLED: true ## Specify whether to disable the terminals feature