Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3.9"

services:
codegate-proxy:
networks:
- codegatenet
build:
context: .
dockerfile: docker/Dockerfile
image: ghcr.io/stacklok/codegate:latest
pull_policy: always
ports:
- 8989:8989
extra_hosts:
- "host.docker.internal:host-gateway"
command:
- -ollama=http://host.docker.internal:11434 # For local LLM
- -vllm=https://inference.codegate.ai # For hosted LLM
- -ollama-embed=http://host.docker.internal:11434
- -package-index=/opt/rag-in-a-box/data/
- -db=rag-db
depends_on:
- rag-qdrant-db

rag-qdrant-db:
image: ghcr.io/stacklok/codegate/qdrant-codegate@sha256:fccd830f8eaf9079972fee1eb95908ffe42d4571609be8bffa32fd26610481f7
container_name: rag-db
ports:
- "6333:6333"
- "6334:6334"
networks:
- codegatenet

networks:
codegatenet:
driver: bridge
7 changes: 6 additions & 1 deletion src/codegate/updates/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import requests
import structlog
import os

logger = structlog.get_logger("codegate")

Expand All @@ -25,9 +26,13 @@ def get_latest_version(self, origin: Origin) -> str:
"""
Retrieves the latest version of CodeGate from updates.codegate.ai
"""

user_agent = f"codegate/{self.__current_version} {origin.value}"
if os.environ.get("CODEGATE_DEV_ENV"):
user_agent += "-dev"
headers = {
"X-Instance-ID": self.__instance_id,
"User-Agent": f"codegate/{self.__current_version} {origin.value}",
"User-Agent": user_agent,
}

try:
Expand Down
Loading