Add HAProxy TLS routing for HK CMI
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Hong Kong CMI LiteLLM Vertex AI Relay
|
||||
|
||||
- 仅通过 Hong Kong CMI 节点的 Tailscale IPv4 地址监听;`LISTEN_IP` 不要填写公网地址或 `0.0.0.0`。
|
||||
- ADC、LiteLLM key 仅存放于 Arcane `.env`,不得提交 Git。
|
||||
- 默认监听端口为 `1049`;需要修改时设置 `LITELLM_PORT`。
|
||||
- 后续 Vertex Anthropic 模型在 `config.yaml` 增加独立模型项。
|
||||
@@ -0,0 +1,39 @@
|
||||
services:
|
||||
adc-init:
|
||||
image: alpine:3.24
|
||||
restart: "no"
|
||||
environment:
|
||||
GOOGLE_ADC_B64: ${GOOGLE_ADC_B64}
|
||||
volumes:
|
||||
- google-adc:/credentials
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
umask 077
|
||||
printf '%s' "$${GOOGLE_ADC_B64}" | base64 -d > /credentials/application_default_credentials.json
|
||||
|
||||
litellm:
|
||||
image: ghcr.io/berriai/litellm:main-stable
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
adc-init:
|
||||
condition: service_completed_successfully
|
||||
network_mode: host
|
||||
environment:
|
||||
GOOGLE_APPLICATION_CREDENTIALS: /credentials/application_default_credentials.json
|
||||
VERTEXAI_PROJECT: ${VERTEXAI_PROJECT}
|
||||
VERTEXAI_LOCATION: ${VERTEXAI_LOCATION:-global}
|
||||
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY}
|
||||
volumes:
|
||||
- ./config.yaml:/app/config.yaml:ro
|
||||
- google-adc:/credentials:ro
|
||||
command: ["--config", "/app/config.yaml", "--host", "${LISTEN_IP:-127.0.0.1}", "--port", "${LITELLM_PORT:-1049}"]
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 1m
|
||||
max-file: "2"
|
||||
|
||||
volumes:
|
||||
google-adc:
|
||||
@@ -0,0 +1,16 @@
|
||||
# Hong Kong CMI node model routing.
|
||||
model_list:
|
||||
- model_name: gemini-3.6-flash
|
||||
litellm_params:
|
||||
model: vertex_ai/gemini-3.6-flash
|
||||
vertex_project: os.environ/VERTEXAI_PROJECT
|
||||
vertex_location: os.environ/VERTEXAI_LOCATION
|
||||
|
||||
- model_name: gemini-3.5-flash-lite
|
||||
litellm_params:
|
||||
model: vertex_ai/gemini-3.5-flash-lite
|
||||
vertex_project: os.environ/VERTEXAI_PROJECT
|
||||
vertex_location: os.environ/VERTEXAI_LOCATION
|
||||
|
||||
general_settings:
|
||||
master_key: os.environ/LITELLM_MASTER_KEY
|
||||
Reference in New Issue
Block a user