mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
Refactor templates (#52)
* Switching from docker compose to abstract form - should be easier to k8s later * Text loader util * Recreate templates
This commit is contained in:
parent
af5508ff68
commit
65d7f6d261
47 changed files with 1659 additions and 1277 deletions
20
templates/config-to-docker-compose.jsonnet
Normal file
20
templates/config-to-docker-compose.jsonnet
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
local engine = import "docker-compose.jsonnet";
|
||||
local decode = import "decode-config.jsonnet";
|
||||
local components = import "components.jsonnet";
|
||||
|
||||
// Import config
|
||||
local config = import "config.json";
|
||||
|
||||
// Produce patterns from config
|
||||
local patterns = decode(config);
|
||||
|
||||
// Extract resources usnig the engine
|
||||
local resources = std.foldl(
|
||||
function(state, p) state + p.create(engine),
|
||||
std.objectValues(patterns),
|
||||
{}
|
||||
);
|
||||
|
||||
resources
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue