added kalliope api

This commit is contained in:
Boris De Vloed
2021-05-26 17:18:05 +02:00
parent ed3855e5a1
commit 334c3555cd
5 changed files with 59 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
defmodule Delta.Config do
def targets do
[ "http://deltanotifier" ]
end
end

16
config/delta/rules.js Normal file
View File

@@ -0,0 +1,16 @@
export default [
{
match: {
subject: {
}
},
callback: {
url: "http://kalliope-api/delta", method: "POST"
},
options: {
resourceFormat: "v0.0.1",
gracePeriod: 1000,
ignoreFromSelf: true
}
}
]

View File

@@ -8,7 +8,7 @@ defmodule Dispatcher do
any: [ "*/*" ],
]
define_layers [ :api, :frontend, :not_found ]
define_layers [ :api_services, :api, :frontend, :not_found ]
###############################################################
# sparql endpoint
@@ -17,6 +17,26 @@ defmodule Dispatcher do
forward conn, path, "http://db:8890/sparql/"
end
###############
# API SERVICES
###############
match "/v3/api-docs/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://kalliope-api/v3/api-docs/"
end
match "/delta/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://kalliope-api/delta/"
end
match "/changes/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://kalliope-api/changes/"
end
match "/consolidated/*path", %{ layer: :api_services, accept: %{ json: true } } do
forward conn, path, "http://kalliope-api/consolidated/"
end
###############################################################
# ember metis
###############################################################

View File

@@ -1,2 +1,3 @@
root:$apr1$x9yMUyVV$w2FZk76C0mbKOlDHdLDV30
contacthub:$apr1$X8vLzV8z$Xsb.0lLoyasxfvwxQGQUp/
contacthub:$apr1$X8vLzV8z$Xsb.0lLoyasxfvwxQGQUp/
kalliope:$apr1$1HrKMwbi$Uqc18XpIohhrabnM49ete1

View File

@@ -12,7 +12,7 @@ services:
image: semtech/mu-identifier:1.9.1
environment:
DEFAULT_ACCESS_CONTROL_ALLOW_ORIGIN_HEADER: "*"
DEFAULT_MU_AUTH_ALLOWED_GROUPS_HEADER: "[{\"variables\":[],\"name\":\"public\"}]"
DEFAULT_MU_AUTH_ALLOWED_GROUPS_HEADER: "[{\"variables\":[],\"name\":\"public\"}, {\"variables\":[],\"name\":\"clean\"}]"
labels:
- "logging=true"
restart: always
@@ -92,7 +92,20 @@ services:
logging: *default-logging
labels:
- "logging=true"
kalliope-api:
image: lblod/app-kalliope-api
volumes:
- ./config/kalliope:/config
- ./data/files:/share
environment:
SERVER_PORT: "80"
LOGGING_LEVEL: "INFO"
SPARQL_ENDPOINT: "http://db:8890/sparql"
restart: always
deltanotifier:
image: semtech/mu-delta-notifier:0.1.0
volumes:
- ./config/delta:/config
frontend:
image: lblod/frontend-contact-hub
labels: