- HTML 80.9%
- CSS 15.7%
- JavaScript 2.1%
- Dockerfile 1.3%
| mono | ||
| .DS_Store | ||
| .gitignore | ||
| GEMINI.md | ||
| README.md | ||
| renovate.json | ||
| SETUP.md | ||
CoreBotLabs Infrastructure Stack
This repository contains the Docker Compose configurations and deployment settings for the multi-VM infrastructure stack managed centrally via Komodo.
Architecture Overview
The infrastructure spans 5 Virtual Machines, with dedicated roles and centralized logging/monitoring.
vm1-master(IP:${MASTER_IP}): Core routing (Nginx), Authentication (Authentik), Central Monitoring (Prometheus, Grafana, Loki), and Komodo Core.vm2-git(IP:${GIT_IP}): Version control and source code management (Forgejo) and dependency automation (Renovate).vm3-database(IP:${DB_IP}): Data persistence (MongoDB, PostgreSQL, Redis).vm4-pihole(IP:${PIHOLE_IP}): Network-wide DNS sinkhole (Pi-hole).vm5-vaultwarden(IP:${VAULTWARDEN_IP}): Secure password management (Vaultwarden).
Note: All VMs run standard metrics exporters (Node Exporter, cAdvisor, Docker Exporter) and log forwarding (Promtail) that connect back to vm1-master.
Environment Variables & IPs
To make the stack portable and avoid hardcoded IPs, the stack relies on environment variables for inter-VM communication. Ensure the following environment variables are defined in your Komodo Global Variables (or in a .env file pulled during deployment) before deploying the stacks:
MASTER_IP=<your-master-ip>
GIT_IP=<your-git-ip>
DB_IP=<your-database-ip>
PIHOLE_IP=<your-pihole-ip>
VAULTWARDEN_IP=<your-vaultwarden-ip>
Other critical credentials (e.g., DB_ROOT_USER, KOMODO_KEY, RENO_TOKEN) must also be configured securely in your deployment environment.
Key Services & Configuration Highlights
Centralized Logging (Promtail & Loki)
All logs are forwarded to Loki on vm1-master. Promtail relies on the ${MASTER_IP} variable to find Loki.
- Important: The
docker-compose.ymlfor Promtail stacks uses-config.expand-env=trueto parse these variables. Ensureconfig.ymlis successfully mounted as a file on the host.
Centralized Monitoring (Prometheus)
Prometheus on vm1-master scrapes metrics from all VMs using the parameterized environment variables.
- Important: Prometheus uses the
--enable-feature=envvar-expansionflag to resolve variables like${DB_IP}insideprometheus.yml.
Forgejo & Renovate Automation (vm2-git)
Forgejo operates as the Git service, connected to a remote Postgres instance on ${DB_IP}.
- Renovate: Automates dependency updates. It runs in a continuous
while truesleep loop to prevent Docker daemon restart loops. - Configuration: Renovate requires a dedicated admin API token (
RENO_TOKEN) for therenovate-botuser generated via the Forgejo admin CLI to authenticate and autodiscover repositories.
Vaultwarden (vm5-vaultwarden)
Provides secure password management. It connects to the Postgres database hosted on vm3-database using the parameterized ${DB_IP}.
Deployment
Deployments are managed centrally via Komodo. Komodo Periphery agents (8120) run on all nodes, communicating with the Komodo Core on vm1-master (9120).
To apply changes to any stack:
- Commit and push your updates to this repository.
- Trigger the respective stack deployment or restart in the Komodo Dashboard.