diff --git a/README.md b/README.md index 9f1d7a7..a9ba2ff 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Compose Anything helps users quickly deploy various services by providing a set | [Apache Kafka](./src/kafka) | 7.8.0 | | [Apache Pulsar](./src/pulsar) | 4.0.7 | | [Apache RocketMQ](./src/rocketmq) | 5.3.1 | -| [Bifrost Gateway](./src/bifrost-gateway) | 1.3.48 | +| [Bifrost Gateway](./src/bifrost-gateway) | v1.3.54 | | [Bolt.diy](./src/bolt-diy) | latest | | [Budibase](./src/budibase) | 3.23.0 | | [Bytebot](./src/bytebot) | edge | @@ -62,9 +62,9 @@ Compose Anything helps users quickly deploy various services by providing a set | [MinerU vLLM](./builds/mineru-vllm) | 2.6.4 | | [MinIO](./src/minio) | RELEASE.2025-09-07T16-13-09Z | | [MLflow](./src/mlflow) | v2.20.2 | -| [MongoDB ReplicaSet Single](./src/mongodb-replicaset-single) | 8.0.13 | -| [MongoDB ReplicaSet](./src/mongodb-replicaset) | 8.0.13 | -| [MongoDB Standalone](./src/mongodb-standalone) | 8.0.13 | +| [MongoDB ReplicaSet Single](./src/mongodb-replicaset-single) | 8.2.3 | +| [MongoDB ReplicaSet](./src/mongodb-replicaset) | 8.2.3 | +| [MongoDB Standalone](./src/mongodb-standalone) | 8.2.3 | | [MySQL](./src/mysql) | 9.4.0 | | [n8n](./src/n8n) | 1.114.0 | | [Nacos](./src/nacos) | v3.1.0 | diff --git a/README.zh.md b/README.zh.md index 126855b..afb18d4 100644 --- a/README.zh.md +++ b/README.zh.md @@ -14,7 +14,7 @@ Compose Anything 通过提供一组高质量的 Docker Compose 配置文件, | [Apache Kafka](./src/kafka) | 7.8.0 | | [Apache Pulsar](./src/pulsar) | 4.0.7 | | [Apache RocketMQ](./src/rocketmq) | 5.3.1 | -| [Bifrost Gateway](./src/bifrost-gateway) | 1.3.48 | +| [Bifrost Gateway](./src/bifrost-gateway) | v1.3.54 | | [Bolt.diy](./src/bolt-diy) | latest | | [Budibase](./src/budibase) | 3.23.0 | | [Bytebot](./src/bytebot) | edge | @@ -62,9 +62,9 @@ Compose Anything 通过提供一组高质量的 Docker Compose 配置文件, | [MinerU vLLM](./builds/mineru-vllm) | 2.6.4 | | [MinIO](./src/minio) | RELEASE.2025-09-07T16-13-09Z | | [MLflow](./src/mlflow) | v2.20.2 | -| [MongoDB ReplicaSet Single](./src/mongodb-replicaset-single) | 8.0.13 | -| [MongoDB ReplicaSet](./src/mongodb-replicaset) | 8.0.13 | -| [MongoDB Standalone](./src/mongodb-standalone) | 8.0.13 | +| [MongoDB ReplicaSet Single](./src/mongodb-replicaset-single) | 8.2.3 | +| [MongoDB ReplicaSet](./src/mongodb-replicaset) | 8.2.3 | +| [MongoDB Standalone](./src/mongodb-standalone) | 8.2.3 | | [MySQL](./src/mysql) | 9.4.0 | | [n8n](./src/n8n) | 1.114.0 | | [Nacos](./src/nacos) | v3.1.0 | diff --git a/src/bifrost-gateway/.env.example b/src/bifrost-gateway/.env.example index 066038b..4278ff8 100644 --- a/src/bifrost-gateway/.env.example +++ b/src/bifrost-gateway/.env.example @@ -1,5 +1,13 @@ # Bifrost Gateway Version -BIFROST_VERSION=v1.3.48 +BIFROST_VERSION=v1.3.54 # Port to bind to on the host machine BIFROST_PORT=28080 + +# Telemetry +PROMETHEUS_VERSION=v3.0.1 +PROMETHEUS_PORT=29090 +GRAFANA_VERSION=11.4.0 +GRAFANA_PORT=23000 +GRAFANA_ADMIN_USER=admin +GRAFANA_ADMIN_PASSWORD=admin diff --git a/src/bifrost-gateway/README.md b/src/bifrost-gateway/README.md index 6eb92f6..d311219 100644 --- a/src/bifrost-gateway/README.md +++ b/src/bifrost-gateway/README.md @@ -7,12 +7,39 @@ Bifrost is a lightweight, high-performance LLM gateway that supports multiple mo ## Services - `bifrost`: The LLM gateway service. +- `prometheus`: Prometheus for metrics collection (enabled with `--profile telemetry`). +- `grafana`: Grafana for visualization (enabled with `--profile telemetry`). ## Configuration -- `BIFROST_VERSION`: The version of the Bifrost image, default is `v1.3.48`. +- `BIFROST_VERSION`: The version of the Bifrost image, default is `v1.3.54`. - `BIFROST_PORT`: The port for the Bifrost service, default is `28080`. +### Telemetry + +- `PROMETHEUS_VERSION`: Prometheus version, default `v3.0.1`. +- `PROMETHEUS_PORT`: Prometheus port, default `29090`. +- `GRAFANA_VERSION`: Grafana version, default `11.4.0`. +- `GRAFANA_PORT`: Grafana port, default `23000`. +- `GRAFANA_ADMIN_USER`: Grafana admin user, default `admin`. +- `GRAFANA_ADMIN_PASSWORD`: Grafana admin password, default `admin`. + +## Usage + +Start the gateway: + +```bash +docker compose up -d +``` + +Start with telemetry (Prometheus + Grafana): + +```bash +docker compose --profile telemetry up -d +``` + ## Volumes - `bifrost_data`: A volume for storing Bifrost data. +- `prometheus_data`: A volume for storing Prometheus data. +- `grafana_data`: A volume for storing Grafana data. diff --git a/src/bifrost-gateway/README.zh.md b/src/bifrost-gateway/README.zh.md index 9e3118a..05e68a5 100644 --- a/src/bifrost-gateway/README.zh.md +++ b/src/bifrost-gateway/README.zh.md @@ -7,12 +7,39 @@ Bifrost 是一个轻量级、高性能的 LLM 网关,支持多种模型和提 ## 服务 - `bifrost`: LLM 网关服务。 +- `prometheus`: 用于指标收集的 Prometheus(通过 `--profile telemetry` 启用)。 +- `grafana`: 用于可视化的 Grafana(通过 `--profile telemetry` 启用)。 ## 配置 -- `BIFROST_VERSION`: Bifrost 镜像的版本,默认为 `v1.3.48`。 +- `BIFROST_VERSION`: Bifrost 镜像的版本,默认为 `v1.3.54`。 - `BIFROST_PORT`: Bifrost 服务的端口,默认为 `28080`。 +### 遥测 (Telemetry) + +- `PROMETHEUS_VERSION`: Prometheus 版本,默认为 `v3.0.1`。 +- `PROMETHEUS_PORT`: Prometheus 端口,默认为 `29090`。 +- `GRAFANA_VERSION`: Grafana 版本,默认为 `11.4.0`。 +- `GRAFANA_PORT`: Grafana 端口,默认为 `23000`。 +- `GRAFANA_ADMIN_USER`: Grafana 管理员用户,默认为 `admin`。 +- `GRAFANA_ADMIN_PASSWORD`: Grafana 管理员密码,默认为 `admin`。 + +## 使用 + +启动网关: + +```bash +docker compose up -d +``` + +启动带有遥测功能(Prometheus + Grafana)的网关: + +```bash +docker compose --profile telemetry up -d +``` + ## 卷 - `bifrost_data`: 用于存储 Bifrost 数据的卷。 +- `prometheus_data`: 用于存储 Prometheus 数据的卷。 +- `grafana_data`: 用于存储 Grafana 数据的卷。 diff --git a/src/bifrost-gateway/config/grafana/datasources.yml b/src/bifrost-gateway/config/grafana/datasources.yml new file mode 100644 index 0000000..44999d4 --- /dev/null +++ b/src/bifrost-gateway/config/grafana/datasources.yml @@ -0,0 +1,9 @@ +apiVersion: 1 + +datasources: + - name: Prometheus + type: prometheus + url: http://prometheus:9090 + isDefault: true + access: proxy + editable: true diff --git a/src/bifrost-gateway/config/prometheus.yml b/src/bifrost-gateway/config/prometheus.yml new file mode 100644 index 0000000..768a5cd --- /dev/null +++ b/src/bifrost-gateway/config/prometheus.yml @@ -0,0 +1,8 @@ +global: + scrape_interval: 15s + +scrape_configs: + - job_name: 'bifrost' + metrics_path: '/metrics' + static_configs: + - targets: ['bifrost:8080'] diff --git a/src/bifrost-gateway/docker-compose.yaml b/src/bifrost-gateway/docker-compose.yaml index 997fbd1..327d583 100644 --- a/src/bifrost-gateway/docker-compose.yaml +++ b/src/bifrost-gateway/docker-compose.yaml @@ -9,7 +9,7 @@ x-defaults: &defaults services: bifrost: <<: *defaults - image: ${GLOBAL_REGISTRY:-}maximhq/bifrost:${BIFROST_VERSION:-v1.3.48} + image: ${GLOBAL_REGISTRY:-}maximhq/bifrost:${BIFROST_VERSION:-v1.3.54} volumes: - bifrost_data:/app/data ports: @@ -31,5 +31,64 @@ services: retries: 3 start_period: 10s + prometheus: + <<: *defaults + image: ${GLOBAL_REGISTRY:-}prom/prometheus:${PROMETHEUS_VERSION:-v3.8.1} + profiles: ["telemetry"] + volumes: + - ./config/prometheus.yml:/etc/prometheus/prometheus.yml + - prometheus_data:/prometheus + command: + - '--config.file=/etc/prometheus/prometheus.yml' + - '--storage.tsdb.path=/prometheus' + - '--web.console.libraries=/usr/share/prometheus/console_libraries' + - '--web.console.templates=/usr/share/prometheus/consoles' + ports: + - "${PROMETHEUS_PORT:-29090}:9090" + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9090/-/healthy"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + deploy: + resources: + limits: + cpus: ${PROMETHEUS_CPU_LIMIT:-0.50} + memory: ${PROMETHEUS_MEMORY_LIMIT:-512M} + reservations: + cpus: ${PROMETHEUS_CPU_RESERVATION:-0.10} + memory: ${PROMETHEUS_MEMORY_RESERVATION:-128M} + + grafana: + <<: *defaults + image: ${GLOBAL_REGISTRY:-}grafana/grafana:${GRAFANA_VERSION:-12.3.1} + profiles: ["telemetry"] + volumes: + - ./config/grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml + - grafana_data:/var/lib/grafana + environment: + - GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER:-admin} + - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin} + - GF_USERS_ALLOW_SIGN_UP=false + ports: + - "${GRAFANA_PORT:-23000}:3000" + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + deploy: + resources: + limits: + cpus: ${GRAFANA_CPU_LIMIT:-0.50} + memory: ${GRAFANA_MEMORY_LIMIT:-512M} + reservations: + cpus: ${GRAFANA_CPU_RESERVATION:-0.10} + memory: ${GRAFANA_MEMORY_RESERVATION:-128M} + volumes: bifrost_data: + prometheus_data: + grafana_data: diff --git a/src/mongodb-replicaset-single/.env.example b/src/mongodb-replicaset-single/.env.example index 123d59a..ce6b8ed 100644 --- a/src/mongodb-replicaset-single/.env.example +++ b/src/mongodb-replicaset-single/.env.example @@ -2,7 +2,7 @@ TZ=UTC # MongoDB Version -MONGO_VERSION=8.0.13 +MONGO_VERSION=8.2.3 # MongoDB root credentials MONGO_INITDB_ROOT_USERNAME=root diff --git a/src/mongodb-replicaset-single/README.md b/src/mongodb-replicaset-single/README.md index 0ec1bc0..ba64500 100644 --- a/src/mongodb-replicaset-single/README.md +++ b/src/mongodb-replicaset-single/README.md @@ -9,6 +9,7 @@ This service sets up a single-node MongoDB replica set, ideal for development an 1. Generate a key file for the replica set: ```bash + mkdir -p ./secrets openssl rand -base64 756 > ./secrets/rs0.key ``` @@ -41,7 +42,7 @@ This service sets up a single-node MongoDB replica set, ideal for development an ## Configuration - `TZ`: The timezone for the container, default is `UTC`. -- `MONGO_VERSION`: The version of the MongoDB image, default is `8.0.13`. +- `MONGO_VERSION`: The version of the MongoDB image, default is `8.2.3`. - `MONGO_INITDB_ROOT_USERNAME`: The root username for the database, default is `root`. - `MONGO_INITDB_ROOT_PASSWORD`: The root password for the database, default is `password`. - `MONGO_INITDB_DATABASE`: The initial database to create, default is `admin`. diff --git a/src/mongodb-replicaset-single/README.zh.md b/src/mongodb-replicaset-single/README.zh.md index 5f242d2..01cb342 100644 --- a/src/mongodb-replicaset-single/README.zh.md +++ b/src/mongodb-replicaset-single/README.zh.md @@ -9,6 +9,7 @@ 1. 为副本集生成一个密钥文件: ```bash + mkdir -p ./secrets openssl rand -base64 756 > ./secrets/rs0.key ``` @@ -41,7 +42,7 @@ ## 配置 - `TZ`: 容器的时区,默认为 `UTC`。 -- `MONGO_VERSION`: MongoDB 镜像的版本,默认为 `8.0.13`。 +- `MONGO_VERSION`: MongoDB 镜像的版本,默认为 `8.2.3`。 - `MONGO_INITDB_ROOT_USERNAME`: 数据库的 root 用户名,默认为 `root`。 - `MONGO_INITDB_ROOT_PASSWORD`: 数据库的 root 密码,默认为 `password`。 - `MONGO_INITDB_DATABASE`: 要创建的初始数据库,默认为 `admin`。 diff --git a/src/mongodb-replicaset-single/docker-compose.yaml b/src/mongodb-replicaset-single/docker-compose.yaml index 88215be..8af6a68 100644 --- a/src/mongodb-replicaset-single/docker-compose.yaml +++ b/src/mongodb-replicaset-single/docker-compose.yaml @@ -8,7 +8,7 @@ x-defaults: &defaults x-mongo: &mongo <<: *defaults - image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.0.13} + image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.2.3} environment: TZ: ${TZ:-UTC} MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-root} @@ -52,7 +52,7 @@ services: mongo-init: <<: *defaults - image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.0.13} + image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.2.3} restart: on-failure depends_on: mongo1: diff --git a/src/mongodb-replicaset/.env.example b/src/mongodb-replicaset/.env.example index 7aaf22a..8e4ab14 100644 --- a/src/mongodb-replicaset/.env.example +++ b/src/mongodb-replicaset/.env.example @@ -1,5 +1,5 @@ # MongoDB Version -MONGO_VERSION=8.0.13 +MONGO_VERSION=8.2.3 # MongoDB root credentials MONGO_INITDB_ROOT_USERNAME=root diff --git a/src/mongodb-replicaset/README.md b/src/mongodb-replicaset/README.md index 8196b70..d9a3f38 100644 --- a/src/mongodb-replicaset/README.md +++ b/src/mongodb-replicaset/README.md @@ -9,6 +9,7 @@ This service sets up a MongoDB replica set with three members. 1. Generate a key file for the replica set: ```bash + mkdir -p ./secrets openssl rand -base64 756 > ./secrets/rs0.key ``` @@ -41,7 +42,7 @@ This service sets up a MongoDB replica set with three members. ## Configuration - `TZ`: The timezone for the container, default is `UTC`. -- `MONGO_VERSION`: The version of the MongoDB image, default is `8.0.13`. +- `MONGO_VERSION`: The version of the MongoDB image, default is `8.2.3`. - `MONGO_INITDB_ROOT_USERNAME`: The root username for the database, default is `root`. - `MONGO_INITDB_ROOT_PASSWORD`: The root password for the database, default is `password`. - `MONGO_INITDB_DATABASE`: The initial database to create, default is `admin`. diff --git a/src/mongodb-replicaset/README.zh.md b/src/mongodb-replicaset/README.zh.md index 90e5cef..9819f52 100644 --- a/src/mongodb-replicaset/README.zh.md +++ b/src/mongodb-replicaset/README.zh.md @@ -9,6 +9,7 @@ 1. 为副本集生成一个密钥文件: ```bash + mkdir -p ./secrets openssl rand -base64 756 > ./secrets/rs0.key ``` @@ -41,7 +42,7 @@ ## 配置 - `TZ`: 容器的时区,默认为 `UTC`。 -- `MONGO_VERSION`: MongoDB 镜像的版本,默认为 `8.0.13`。 +- `MONGO_VERSION`: MongoDB 镜像的版本,默认为 `8.2.3`。 - `MONGO_INITDB_ROOT_USERNAME`: 数据库的 root 用户名,默认为 `root`。 - `MONGO_INITDB_ROOT_PASSWORD`: 数据库的 root 密码,默认为 `password`。 - `MONGO_INITDB_DATABASE`: 要创建的初始数据库,默认为 `admin`。 diff --git a/src/mongodb-replicaset/docker-compose.yaml b/src/mongodb-replicaset/docker-compose.yaml index 58ad1ab..c50f7dc 100644 --- a/src/mongodb-replicaset/docker-compose.yaml +++ b/src/mongodb-replicaset/docker-compose.yaml @@ -8,7 +8,7 @@ x-defaults: &defaults x-mongo: &mongo <<: *defaults - image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.0.13} + image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.2.3} environment: TZ: ${TZ:-UTC} MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-root} @@ -60,7 +60,7 @@ services: mongo-init: <<: *defaults - image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.0.13} + image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.2.3} restart: on-failure depends_on: mongo1: diff --git a/src/mongodb-standalone/.env.example b/src/mongodb-standalone/.env.example index 9f9838a..69a2796 100644 --- a/src/mongodb-standalone/.env.example +++ b/src/mongodb-standalone/.env.example @@ -1,5 +1,5 @@ # MongoDB Version -MONGO_VERSION=8.0.13 +MONGO_VERSION=8.2.3 # MongoDB root credentials MONGO_INITDB_ROOT_USERNAME=root diff --git a/src/mongodb-standalone/README.md b/src/mongodb-standalone/README.md index 5651af7..05c9813 100644 --- a/src/mongodb-standalone/README.md +++ b/src/mongodb-standalone/README.md @@ -33,7 +33,7 @@ MongoDB is a document database designed for ease of application development and | Variable | Description | Default | | ---------------------------- | ---------------- | ---------- | -| `MONGO_VERSION` | MongoDB version | `8.0.13` | +| `MONGO_VERSION` | MongoDB version | `8.2.3` | | `MONGO_INITDB_ROOT_USERNAME` | Root username | `root` | | `MONGO_INITDB_ROOT_PASSWORD` | Root password | `password` | | `MONGO_INITDB_DATABASE` | Initial database | `admin` | diff --git a/src/mongodb-standalone/README.zh.md b/src/mongodb-standalone/README.zh.md index 6f140df..d1ff7a8 100644 --- a/src/mongodb-standalone/README.zh.md +++ b/src/mongodb-standalone/README.zh.md @@ -33,7 +33,7 @@ MongoDB 是一个为应用程序开发和扩展的简易性而设计的文档数 | 变量 | 描述 | 默认值 | | ---------------------------- | ------------ | ---------- | -| `MONGO_VERSION` | MongoDB 版本 | `8.0.13` | +| `MONGO_VERSION` | MongoDB 版本 | `8.2.3` | | `MONGO_INITDB_ROOT_USERNAME` | 根用户名 | `root` | | `MONGO_INITDB_ROOT_PASSWORD` | 根密码 | `password` | | `MONGO_INITDB_DATABASE` | 初始数据库 | `admin` | diff --git a/src/mongodb-standalone/docker-compose.yaml b/src/mongodb-standalone/docker-compose.yaml index 3d0f5e0..cde2cdf 100644 --- a/src/mongodb-standalone/docker-compose.yaml +++ b/src/mongodb-standalone/docker-compose.yaml @@ -9,7 +9,7 @@ x-defaults: &defaults services: mongo: <<: *defaults - image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.0.13} + image: ${GLOBAL_REGISTRY:-}mongo:${MONGO_VERSION:-8.2.3} environment: TZ: ${TZ:-UTC} MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-root}