mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 08:26:21 +02:00
Fix API gateway integration, added to templates (#165)
This commit is contained in:
parent
92b84441eb
commit
ba6d6c13af
3 changed files with 81 additions and 24 deletions
|
|
@ -5,9 +5,51 @@ local prompt = import "prompt-template.jsonnet";
|
|||
|
||||
{
|
||||
|
||||
"api-gateway-port":: 8088,
|
||||
"api-gateway-timeout":: 600,
|
||||
|
||||
"chunk-size":: 250,
|
||||
"chunk-overlap":: 15,
|
||||
|
||||
"api-gateway" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
local port = $["api-gateway-port"];
|
||||
|
||||
local container =
|
||||
engine.container("api-gateway")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"api-gateway",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"--timeout",
|
||||
std.toString($["api-gateway-timeout"]),
|
||||
"--port",
|
||||
std.toString(port),
|
||||
])
|
||||
.with_limits("0.5", "256M")
|
||||
.with_reservations("0.1", "256M")
|
||||
.with_port(8000, 8000, "metrics")
|
||||
.with_port(port, port, "api");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"api-gateway", [ container ]
|
||||
);
|
||||
|
||||
local service =
|
||||
engine.internalService(containerSet)
|
||||
.with_port(8000, 8000, "metrics")
|
||||
.with_port(port, port, "api");
|
||||
|
||||
engine.resources([
|
||||
containerSet,
|
||||
service,
|
||||
])
|
||||
|
||||
},
|
||||
|
||||
"chunker" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue