mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 23:11:00 +02:00
git-subtree-dir: ai-context/trustgraph-templates git-subtree-split: 42a5fd1b678f32be378062e30451e2052ccb95dd
82 lines
2.3 KiB
Jsonnet
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,
|
|
])
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|