Metis & frontend

This commit is contained in:
Nordine Bittich
2021-03-18 09:26:43 +01:00
parent 2a2882c229
commit 3bffa7778c
3 changed files with 68 additions and 6 deletions

View File

@@ -10,6 +10,43 @@ defmodule Dispatcher do
define_layers [ :api, :frontend, :not_found ]
###############################################################
# sparql endpoint
###############################################################
match "/sparql/*path", %{ accept: [:any], layer: :api} do
forward conn, path, "http://db:8890/sparql/"
end
###############################################################
# ember metis
###############################################################
get "/uri-info/*path", %{ accept: [:json], layer: :api} do
forward conn, path, "http://uri-info/"
end
get "/resource-labels/*path", %{ accept: [:json], layer: :api} do
forward conn, path, "http://resource-labels/"
end
###############################################################
# frontend layer
###############################################################
match "/assets/*path", %{ layer: :api } do
Proxy.forward conn, path, "http://frontend/assets/"
end
match "/@appuniversum/*path", %{ layer: :api } do
Proxy.forward conn, path, "http://frontend/@appuniversum/"
end
match "/*path", %{ accept: [:html], layer: :api } do
Proxy.forward conn, [], "http://frontend/index.html"
end
match "/*_path", %{ layer: :frontend } do
Proxy.forward conn, [], "http://frontend/index.html"
end
###############################################################
# errors
###############################################################

View File

@@ -4,9 +4,3 @@ services:
web:
ports:
- "80:80"
triplestore:
ports:
- "8890:8890"
environment:
ENABLE_ENDPOINT_SELECTOR: "true"
DEFAULT_SPARQL_ENDPOINT: "http://localhost:8890/sparql"

View File

@@ -67,4 +67,35 @@ services:
- "logging=true"
restart: always
logging: *default-logging
# Ember-Metis
uri-info:
image: redpencil/mu-uri-info-service:0.2.0
links:
- db:database
restart: always
logging: *default-logging
labels:
- "logging=true"
resource-labels-cache:
image: semtech/mu-cache:2.0.1
links:
- resource-labels:backend
restart: always
logging: *default-logging
labels:
- "logging=true"
resource-labels:
image: lblod/resource-label-service:0.0.3
links:
- db:database
restart: always
logging: *default-logging
labels:
- "logging=true"
frontend:
image: lblod/frontend-contact-hub
labels:
- "logging=true"
restart: always
logging: *default-logging