Make SentinelAI runnable locally via Docker Compose (golden path) - #1
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/Trojan3877/SentinelAI/sessions/adde0f80-49b7-4e36-bf38-e462a32c31dd Co-authored-by: Trojan3877 <182694928+Trojan3877@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Trojan3877/SentinelAI/sessions/adde0f80-49b7-4e36-bf38-e462a32c31dd Co-authored-by: Trojan3877 <182694928+Trojan3877@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Docker Compose setup for local execution of SentinelAI
Make SentinelAI runnable locally via Docker Compose (golden path)
Apr 2, 2026
CoreyLeath-code
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The repo had no coherent local run story: broken CI filename, incomplete
docker-compose.yml(Prometheus/Grafana only, missingservices:key), no Dockerfiles for most services, and a README quickstart pointing at directories that didn't exist.Core:
docker compose up --buildnow starts the full stackSeven services, wired with healthchecks and
depends_on:postgresingestion-servicedrift-enginellm-guardstreamlit-dashboardprometheusgrafanaNew files
.env.example—WAREHOUSE_MODE=postgresdefault; Snowflake vars present but blank for opt-indocker/initdb/01_schema.sql— bootstrapsinference_logs,drift_baselines,drift_scores,incidents,incident_summarieson first Postgres startdrift-engine/—drift_engine.cppnow reads JSON from stdin / emits JSON to stdout; wrapped by a FastAPI server (server.py); multi-stage Dockerfile (GCC → Python slim)ingestion-service/main.go— proper Go module; writes to Postgres whenWAREHOUSE_MODE=postgres, logs otherwise; exposes/log,/health,/metricsllm-guard/app.py— calls Ollama for summarization, falls back to rule-based stub if unreachable; writes summaries toincident_summariesstreamlit-dashboard/app.py— four-tab UI (inference logs, drift scores, incidents, service health) reading directly from Postgresmonitoring/grafana/provisioning/— Grafana auto-provisions Prometheus datasource on startup.gitignoreFixes
.github/workflows/ci.yml)→.github/workflows/ci.yml; replaced stub content with a full pipeline (Compose build,go vet, C++ build, Python lint, pytest)permissions: contents: readto CI workflowcp .env.example .env && docker compose up --buildwith curl examplesQuick example
Original prompt
Create a pull request to make
Trojan3877/SentinelAIrunnable locally via Docker Compose as the primary "golden path".Goals
docker compose up --buildfrom repo root should start a coherent local stack:WAREHOUSE_MODE=postgres|snowflake..github/workflows/ci.yml)to.github/workflows/ci.ymland ensure the README badge points to the correct workflow file.Required changes
.env.examplewith safe defaults for local mode, including Postgres defaults and placeholders for Snowflake configuration.docker-compose.ymlso it defines a full stack and is syntactically correct (top-levelservices:etc.), with sensible ports and healthchecks.docker/initdb/(or similar) to create minimal tables needed for local mode; keep schema minimal but practical for:ingestion-service/(Go multi-stage)llm-guard/(Python)streamlit-dashboard/(Python)drift-engine/(C++ service). If the drift engine is currently a standalonedrift_engine.cpp, move it into adrift-engine/directory and wrap it with a tiny HTTP server (or comparable) so other services can call it./metricsfrom local services.depends_onappropriately.Documentation
README.mdso the first Quickstart is:cp .env.example .envdocker compose up --buildContributing.mdif needed to mention Docker Compose local dev.CI
docker compose build)Notes
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: https://github.com/Trojan3877/SentinelAI how can this repo be improved?
Assistant: I’m the GitHub Copilot Chat Assistant. Here are the highest-impact ways to improve
Trojan3877/SentinelAIbased on what’s currently in the repo (default branchmain, latest commit on 2026-03-17).1) Fix repo “paper cuts” that block automation
.github/workflows/ci.yml)(note the trailing)). That will likely prevent GitHub Actions from running at all, and it also makes your README badge point to a file name that doesn’t exist (ci.yml).Action: rename to
.github/workflows/ci.yml.cd drift-engine, but the repo root showsdrift_engine.cppandingestion_cpp/—notdrift-engine/.Action: align README commands with actual directories/files.
2) Make it installable/runnable in a predictable way
Right now you have multiple components (Go ingestion, C++ drift engine, Streamlit UI, FastAPI deps, k8s/helm/terraform), but the “one command to run it” story is incomplete.
docker-compose.ymlheader: your compose file only defines services (Prometheus/Grafana) and appears to be missing the top-levelservices:key and version (depending on syntax).Action: make
docker-compose upwork and include core services (ingestion, dashboard, etc.) or rename it todocker-compose.monitoring.yml.requirements.txtis unpinned (e.g.,fastapi,torch,transformers). This will create breakage over time.Action: pin versions, or adopt
uv/poetryand commit a lockfile..env.exampleexplaining required env vars and “local mode” defaults.3) Strengthen CI quality gates (beyond “it builds”)
Your
Contributing.mdcalls out Black + Pytest, but there’s no proof they run end-to-end.ruff/`black --chec...This pull request was created from Copilot chat.