mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-05-24 15:54:05 +02:00
Merge branch 'main' into anthropic-implement
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
# Python cache and test artifacts
|
||||
__pycache__/
|
||||
.pytest_cache/
|
||||
.py[oc]
|
||||
|
||||
# Coverage and build artifacts
|
||||
.coverage
|
||||
htmlcov/
|
||||
build/
|
||||
dist/
|
||||
wheels/
|
||||
*.egg-info
|
||||
|
||||
# Virtual environment
|
||||
.venv/
|
||||
+5
-1
@@ -6,7 +6,11 @@ from routes.anthropic import proxy as anthropic_proxy
|
||||
from routes.open_ai import proxy as open_ai_proxy
|
||||
from starlette_compress import CompressMiddleware
|
||||
|
||||
app = fastapi.FastAPI()
|
||||
app = fastapi.app = fastapi.FastAPI(
|
||||
docs_url="/api/v1/proxy/docs",
|
||||
redoc_url="/api/v1/proxy/redoc",
|
||||
openapi_url="/api/v1/proxy/openapi.json",
|
||||
)
|
||||
app.add_middleware(CompressMiddleware)
|
||||
|
||||
router = fastapi.APIRouter(prefix="/api/v1")
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
up() {
|
||||
# Ensure the main network exists
|
||||
docker network inspect invariant-explorer-web >/dev/null 2>&1 || \
|
||||
docker network create invariant-explorer-web
|
||||
|
||||
# Start your local docker-compose services
|
||||
docker compose -f docker-compose.local.yml up -d
|
||||
|
||||
echo "Proxy started at http://localhost/api/v1/proxy/"
|
||||
echo "See http://localhost/api/v1/proxy/docs for API documentation"
|
||||
}
|
||||
|
||||
build() {
|
||||
# Build local services
|
||||
docker compose -f docker-compose.local.yml build
|
||||
}
|
||||
|
||||
down() {
|
||||
# Bring down local services
|
||||
docker compose -f docker-compose.local.yml down
|
||||
}
|
||||
|
||||
# -----------------------------
|
||||
# Command dispatcher
|
||||
# -----------------------------
|
||||
case "$1" in
|
||||
"up")
|
||||
up
|
||||
;;
|
||||
"build")
|
||||
build
|
||||
;;
|
||||
"down")
|
||||
down
|
||||
;;
|
||||
"logs")
|
||||
docker compose -f docker-compose.local.yml logs -f
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user