From fa5a08c77f580c848daf54079606c3983935c7eb Mon Sep 17 00:00:00 2001 From: Alejandro Ponce Date: Thu, 12 Dec 2024 22:56:59 +0200 Subject: [PATCH 1/2] Fix port in message to match the documented port and capitalizaton of CodeGate --- src/codegate/pipeline/secrets/secrets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codegate/pipeline/secrets/secrets.py b/src/codegate/pipeline/secrets/secrets.py index 82b08fab..9a621d14 100644 --- a/src/codegate/pipeline/secrets/secrets.py +++ b/src/codegate/pipeline/secrets/secrets.py @@ -362,8 +362,8 @@ async def process_chunk( # Create notification chunk notification_chunk = self._create_chunk( chunk, - f"\n🛡️ [Codegate prevented {redacted_count} {secret_text}]" - f"(http://localhost:8990/?search=codegate-secrets) from being leaked " + f"\n🛡️ [CodeGate prevented {redacted_count} {secret_text}]" + f"(http://localhost:8991/?search=codegate-secrets) from being leaked " f"by redacting them.\n\n", ) From c828ce3596743be5c549126c169fada22386b85d Mon Sep 17 00:00:00 2001 From: Alejandro Ponce Date: Thu, 12 Dec 2024 23:38:54 +0200 Subject: [PATCH 2/2] Default dashboard port to 9090 --- README.md | 8 ++++---- src/codegate/pipeline/secrets/secrets.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0156a1ae..9c745a47 100644 --- a/README.md +++ b/README.md @@ -150,16 +150,16 @@ make image-build ### Run the Container ```bash # Basic usage with local image -docker run -p 8989:8989 -p 8990:80 codegate:latest +docker run -p 8989:8989 -p 9090:80 codegate:latest # With pre-built pulled image docker pull ghcr.io/stacklok/codegate/codegate:latest -docker run --name codegate -d -p 8989:8989 -p 8990:80 ghcr.io/stacklok/codegate/codegate:latest +docker run --name codegate -d -p 8989:8989 -p 9090:80 ghcr.io/stacklok/codegate/codegate:latest # It will mount a volume to /app/codegate_volume # The directory supports storing Llama CPP models under subidrectoy /models # A sqlite DB with the messages and alerts is stored under the subdirectory /db -docker run --name codegate -d -v /path/to/volume:/app/codegate_volume -p 8989:8989 -p 8990:80 ghcr.io/stacklok/codegate/codegate:latest +docker run --name codegate -d -v /path/to/volume:/app/codegate_volume -p 8989:8989 -p 9090:80 ghcr.io/stacklok/codegate/codegate:latest ``` ### Exposed parameters @@ -171,7 +171,7 @@ docker run --name codegate -d -v /path/to/volume:/app/codegate_volume -p 8989:89 - CODEGATE_LOG_FORMAT: Type of log formatting desired when running the codegate server (default to TEXT, can be JSON/TEXT) ```bash -docker run -p 8989:8989 -p 8990:80 -e CODEGATE_OLLAMA_URL=http://1.2.3.4:11434/api ghcr.io/stacklok/codegate/codegate:latest +docker run -p 8989:8989 -p 9090:80 -e CODEGATE_OLLAMA_URL=http://1.2.3.4:11434/api ghcr.io/stacklok/codegate/codegate:latest ``` ## 🤝 Contributing diff --git a/src/codegate/pipeline/secrets/secrets.py b/src/codegate/pipeline/secrets/secrets.py index 9a621d14..a87624e5 100644 --- a/src/codegate/pipeline/secrets/secrets.py +++ b/src/codegate/pipeline/secrets/secrets.py @@ -363,7 +363,7 @@ async def process_chunk( notification_chunk = self._create_chunk( chunk, f"\n🛡️ [CodeGate prevented {redacted_count} {secret_text}]" - f"(http://localhost:8991/?search=codegate-secrets) from being leaked " + f"(http://localhost:9090/?search=codegate-secrets) from being leaked " f"by redacting them.\n\n", )