Trang này được dịch bằng máy. Đọc bản gốc tiếng Anh.

Recipe

kong

Kong, a database-backed API gateway, for local development via Docker Compose, synthesized from the Workload kind by the compose provider. The PostgreSQL backend on the `backend` edge is the system of record, so it renders stateless with no volume. The connection's host, port, user and database arrive on the inject pipe under the four KONG_PG_* variables the edge's inject block names; an edge leaving any missing halts the build naming the edge and the variables. A schema-provisioning step runs the same image and connection before the gateway starts. With no credential on the backend connection, the steps and the gateway share the inline development default the PostgreSQL Recipe for this target also falls back to; an attached one is rendered as KONG_PG_PASSWORD, the key it must publish under. Each model wired to the models socket gets a chat and a completion route through Kong's AI proxy, in Kong's declarative configuration that a second step imports into the database before the gateway starts. A connection's credential is the value it publishes as AI_PROXY_<ALIAS>_API_KEY, written into the bearer token the routes name through Kong's environment vault: a Compose variable reference such as ${OPENAI_API_KEY} lands as that reference, a literal as itself. With `values.metrics_enabled` true the Status API moves off loopback to port 8007 of every interface and provides.metrics_endpoint publishes /metrics on it; false, that key is empty. While it is on, every peer on the Compose network reaches that port, but only a GET of /status, /status/ready or /metrics: the KongStatusGuard bundle refuses the rest, POST /status/ready among them.

Nguồn gốc

Chính thứcĐược ký bởi một danh tính ký mà danh mục này công nhận là nhà phát hành chính thức.
Digest nội dung
sha256:92dedc086399bb798bfc276a39b90177abfbc1960f67b9decbcda3e4538824a2
Đã xuất bản
2026-11-10T10:19:24Z
Danh tính ký
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

Chữ ký

  • Chính thứcapplication/vnd.dev.sigstore.bundle.v0.3+json

    https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

    sha256:469fcdeb5a2144336b09dd76d76bd01e07ac065f5a9daa9c1673ce551c1ac59e

Tham chiếu ở phiên bản này

oci://hub.aggrega.ai/recipe/compose/kong:1.0.0
Đích
—
Triển khai
core/gateway/kong:1.0.0

Cung cấp

Các mẫu con trỏ xác định mà công thức này nối cho bên tiêu thụ.

TênMẫu
host{{ .context.instance_id }}
port{{ .infra.proxy_port }}
protocolhttp
endpoint{{ with optional .values "model" "" }}http://{{ $.context.instance_id }}:{{ $.infra.proxy_port }}/{{ . }}/v1{{ end }}
model{{ optional .values "model" "" }}
metrics_endpoint{{ if .values.metrics_enabled }}http://{{ .context.instance_id }}:{{ .locals.status_port }}/metrics{{ end }}

Workload

Workload · form: stateless · replicas: 1 · containers: main

Giá trị cục bộ

TênMẫu
model_routes_deliverycompose_configs
model_routes_config_name{{ .context.instance_id }}-model-routes
model_routes_path/etc/kong/model-routes.yaml
connection_variable_prefixAI_PROXY_
credential_variable_suffix_API_KEY
header_variable_suffix_AUTHORIZATION
status_port8007
status_guard_deliverycompose_configs
status_guard_config_name{{ .context.instance_id }}-status-guard
status_guard_path/etc/kong/status-guard.conf

Ánh xạ values

Chưa khai báo ánh xạ values nào.

Quan hệ

Các cạnh có kiểu đi tới và đi từ các thực thể đã xuất bản khác. Một tham chiếu không có đích đã xuất bản được hiển thị là một cạnh bị đứt thay vì một liên kết.

Sử dụng

  • triển khaitriển khaihợp đồng tương thích

    core/gateway/kong:1.0.0

    Tất cả đầu ra bắt buộc đều được đáp ứng và mọi đầu ra được cung cấp đều được nêu tên trong hợp đồng.

Được sử dụng bởi

Không có gì trong danh mục phụ thuộc vào thực thể này.

Tài liệu tham khảo khái niệm Recipe →

Danh mục Aggrega — chỉ mục mở gồm các thành phần, tính năng, công thức và các plugin kết xuất chúng.

Được xây dựng bằng hệ thống thiết kế dùng chung của Aggrega.

Quyền riêng tư