trustgraph/trustgraph_configurator/templates/2.2/triple-store/memgraph.jsonnet
elpresidank 74cc8a4685 Squashed 'ai-context/trustgraph-templates/' content from commit 42a5fd1b
git-subtree-dir: ai-context/trustgraph-templates
git-subtree-split: 42a5fd1b678f32be378062e30451e2052ccb95dd
2026-04-05 21:09:49 -05:00

82 lines
2.3 KiB
Jsonnet

local images = import "values/images.jsonnet";
local url = import "values/url.jsonnet";
local memgraph = import "backends/memgraph.jsonnet";
memgraph + {
"memgraph-url":: "bolt://memgraph:7687",
"memgraph-database":: "memgraph",
"store-triples" +: {
create:: function(engine)
local container =
engine.container("store-triples")
.with_image(images.trustgraph_flow)
.with_command([
"triples-write-memgraph",
] + $["pub-sub-args"] + [
"-g",
$["memgraph-url"],
"--database",
$["memgraph-database"],
"--log-level",
$["log-level"],
])
.with_limits("0.5", "128M")
.with_reservations("0.1", "128M");
local containerSet = engine.containers(
"store-triples", [ container ]
);
local service =
engine.internalService(containerSet)
.with_port(8000, 8000, "metrics");
engine.resources([
containerSet,
service,
])
},
"query-triples" +: {
create:: function(engine)
local container =
engine.container("query-triples")
.with_image(images.trustgraph_flow)
.with_command([
"triples-query-memgraph",
] + $["pub-sub-args"] + [
"-g",
$["memgraph-url"],
"--database",
$["memgraph-database"],
"--log-level",
$["log-level"],
])
.with_limits("0.5", "128M")
.with_reservations("0.1", "128M");
local containerSet = engine.containers(
"query-triples", [ container ]
);
local service =
engine.internalService(containerSet)
.with_port(8000, 8000, "metrics");
engine.resources([
containerSet,
service,
])
}
}