48 lines
2.1 KiB
Makefile
48 lines
2.1 KiB
Makefile
# Container runtime: override with `make <target> COMMAND=podman`
|
|
COMMAND := docker
|
|
|
|
COMPOSE_FILE := compose/docker-compose.yml
|
|
ENV_FILE := compose/.env
|
|
API_URL := http://localhost:4000
|
|
|
|
# ─── Docker Compose ───────────────────────────────────────────────────────────
|
|
|
|
docker-up: ## Start the stack (detached)
|
|
$(COMMAND) compose -f $(COMPOSE_FILE) --env-file $(ENV_FILE) up -d
|
|
|
|
docker-down: ## Stop and remove containers
|
|
$(COMMAND) compose -f $(COMPOSE_FILE) --env-file $(ENV_FILE) down
|
|
|
|
docker-restart: docker-down docker-up ## Full restart (re-reads env vars and config)
|
|
|
|
docker-logs: ## Tail logs
|
|
$(COMMAND) compose -f $(COMPOSE_FILE) logs -f
|
|
|
|
docker-ps: ## Show container status
|
|
$(COMMAND) compose -f $(COMPOSE_FILE) ps
|
|
|
|
docker-test: ## Send a test request to each configured model
|
|
@echo "→ claude-sonnet-4-6 (Anthropic)"
|
|
@curl -sf $(API_URL)/v1/chat/completions \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"model":"claude-sonnet-4-6","messages":[{"role":"user","content":"ping"}]}' \
|
|
| python3 -c "import sys,json; d=json.load(sys.stdin); print(d['choices'][0]['message']['content'])"
|
|
@echo "→ or-gpt-5.5 (OpenRouter)"
|
|
@curl -sf $(API_URL)/v1/chat/completions \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"model":"or-gpt-5.5","messages":[{"role":"user","content":"ping"}]}' \
|
|
| python3 -c "import sys,json; d=json.load(sys.stdin); print(d['choices'][0]['message']['content'])"
|
|
|
|
docker-ui: ## Open the agentgateway UI in the browser
|
|
open http://localhost:15000/ui
|
|
|
|
# ─── Help ─────────────────────────────────────────────────────────────────────
|
|
|
|
.PHONY: docker-up docker-down docker-restart docker-logs docker-ps docker-test docker-ui help
|
|
|
|
help: ## Show this help
|
|
@grep -E '^[a-zA-Z_-]+:.*##' $(MAKEFILE_LIST) \
|
|
| awk 'BEGIN {FS = ":.*##"}; {printf " %-20s %s\n", $$1, $$2}'
|
|
|
|
.DEFAULT_GOAL := help
|