forked from blcham/record-manager-ui
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
# Conflicts: # package-lock.json
- Loading branch information
Showing
27 changed files
with
7,230 additions
and
20,746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RECORD_MANAGER_API_URL=http://localhost:1235/record-manager/services/record-manager-server | ||
RECORD_MANAGER_APP_TITLE=Record Manager | ||
RECORD_MANAGER_DEV_SERVER_PORT=3000 | ||
RECORD_MANAGER_PROD_SERVER_PORT=8080 | ||
RECORD_MANAGER_LANGUAGE=cs | ||
RECORD_MANAGER_NAVIGATOR_LANGUAGE=true | ||
RECORD_MANAGER_BASENAME=/ | ||
RECORD_MANAGER_EXTENSIONS=kodi | ||
RECORD_MANAGER_AUTHENTICATION=internal | ||
RECORD_MANAGER_AUTH_SERVER_URL= | ||
RECORD_MANAGER_AUTH_CLIENT_ID=record-manager-ui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Public origin of URL where Record Manager UI will run, e.g. https://kbss.fel.cvut.cz, https://kbss.fel.cvut.cz:8080, http://localhost. | ||
#PUBLIC_ORIGIN=http://localhost | ||
|
||
# Path to root Record Manager application (by default it is set to "/record-manager") | ||
#RECORD_MANAGER_ROOT_PATH=/record-manager-example | ||
|
||
# Prefix for name of all docker containers | ||
RECORD_SET_NAME=iauth-example | ||
|
||
# Host machine port that provides main entrypoint for the application. The application will be locally accessible at http://localhost:$INTERNAL_HOST_PORT/$RECORD_MANAGER_ROOT_PATH (by default it is set to "1235") | ||
#INTERNAL_HOST_PORT=1235 | ||
|
||
# URL to form generation service | ||
FORMGEN_SERVICE_URL=http://s-pipes-engine:8080/s-pipes/service?_pId=clone-form | ||
|
||
RECORD_MANAGER_APP_TITLE=Record Manager | ||
|
||
LANGUAGE=en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
version: '3.9' | ||
|
||
# Provide access to record-manager-ui that runs locally in dev mode | ||
x-access-for-local-development: &local-dev-env | ||
cors.allowedOrigins: "http://localhost:3000" | ||
|
||
services: | ||
nginx: | ||
image: nginx:latest | ||
container_name: ${RECORD_SET_NAME:-rm}-nginx | ||
volumes: | ||
- ./nginx/template-variables.conf:/etc/nginx/templates/variables.conf.template:ro | ||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro | ||
- ./nginx/error.html:/usr/share/nginx/html/error.html:ro | ||
ports: | ||
- "127.0.0.1:${INTERNAL_HOST_PORT:-1235}:80" | ||
restart: always | ||
depends_on: | ||
- record-manager | ||
- record-manager-server | ||
- s-pipes-engine | ||
- db-server | ||
environment: | ||
RECORD_MANAGER_ORIGIN: "${PUBLIC_ORIGIN:-http://localhost:${INTERNAL_HOST_PORT:-1235}}" | ||
RECORD_MANAGER_ROOT_PATH: "${RECORD_MANAGER_ROOT_PATH:-/record-manager}" | ||
|
||
record-manager: | ||
image: ghcr.io/kbss-cvut/kbss-cvut/record-manager-ui:latest | ||
container_name: ${RECORD_SET_NAME:-rm}-record-manager | ||
expose: | ||
- "80" | ||
restart: always | ||
depends_on: | ||
- record-manager-server | ||
environment: | ||
API_URL: "${PUBLIC_ORIGIN:-http://localhost:${INTERNAL_HOST_PORT:-1235}}${RECORD_MANAGER_ROOT_PATH:-/record-manager}/services/record-manager-server" | ||
APP_INFO: "${RECORD_MANAGER_APP_INFO:-}" | ||
APP_TITLE: "${RECORD_MANAGER_APP_TITLE:-Record Manager}" | ||
LANGUAGE: "${LANGUAGE:-en}" | ||
NAVIGATOR_LANGUAGE: "false" | ||
BASENAME: "${RECORD_MANAGER_ROOT_PATH:-/record-manager}" | ||
|
||
record-manager-server: | ||
image: ghcr.io/kbss-cvut/kbss-cvut/record-manager:latest | ||
container_name: ${RECORD_SET_NAME:-rm}-record-manager-server | ||
expose: | ||
- "8080" | ||
restart: always | ||
depends_on: | ||
- s-pipes-engine | ||
- db-server | ||
environment: | ||
<<: *local-dev-env | ||
appContext: "${PUBLIC_ORIGIN:-http://localhost:${INTERNAL_HOST_PORT:-1235}}${RECORD_MANAGER_ROOT_PATH:-/record-manager}" | ||
repositoryUrl: "http://db-server:7200/repositories/record-manager-app" | ||
formGenRepositoryUrl: "http://db-server:7200/repositories/record-manager-formgen" | ||
formGenServiceUrl: "${FORMGEN_SERVICE_URL}" | ||
|
||
s-pipes-engine: | ||
image: ghcr.io/kbss-cvut/s-pipes/s-pipes-engine:latest | ||
container_name: ${RECORD_SET_NAME:-rm}-s-pipes-engine | ||
expose: | ||
- "8080" | ||
restart: always | ||
depends_on: | ||
- db-server | ||
environment: | ||
FORMGEN_REPOSITORY_URL: "http://db-server:7200/repositories/record-manager-formgen" | ||
volumes: | ||
- ./s-pipes-engine/scripts:/scripts/root | ||
|
||
db-server: | ||
build: | ||
context: ../shared/db-server | ||
container_name: ${RECORD_SET_NAME:-rm}-db-server | ||
environment: | ||
GDB_JAVA_OPTS: "-Dgraphdb.external-url=${PUBLIC_ORIGIN:-http://localhost:${INTERNAL_HOST_PORT:-1235}}${RECORD_MANAGER_ROOT_PATH:-/record-manager}/services/db-server" | ||
expose: | ||
- "7200" | ||
restart: always | ||
volumes: | ||
- ../shared/db-server/init-data/forms:/root/graphdb-import/forms:ro | ||
- db-server:/opt/graphdb/home | ||
|
||
volumes: | ||
db-server: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- Record manager Nginx reverse proxy--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title> | ||
<!--# echo var="status" default="" --> | ||
| Record manager | ||
</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<!--# if expr="$status = 502" --> | ||
<meta http-equiv="refresh" content="2"> | ||
<!--# endif --> | ||
</head> | ||
<style type="text/css"> | ||
body { | ||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
color: #fff; | ||
height: 100vh; | ||
margin: 0; | ||
background: #263238 linear-gradient(5deg, #057fa5 0%, #263238 100%); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
</style> | ||
<body> | ||
<!--# if expr="$status = 502" --> | ||
<h1>The application is currently being updated</h1> | ||
<p>You will be redirected to the new version in a few seconds.</p> | ||
<p>If you see this message for more than a minute, something has gone wrong.</p> | ||
<!--# else --> | ||
<h1>Sorry, something went wrong.</h1> | ||
<p><!--# echo var="status" default="" --></p> | ||
<!--# endif --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
client_max_body_size 100M; | ||
|
||
include mime.types; | ||
default_type application/octet-stream; | ||
|
||
map $status $status_text { | ||
400 'Bad Request'; | ||
401 'Unauthorized'; | ||
403 'Forbidden'; | ||
404 'Not Found'; | ||
405 'Method Not Allowed'; | ||
406 'Not Acceptable'; | ||
413 'Payload Too Large'; | ||
414 'URI Too Long'; | ||
431 'Request Header Fields Too Large'; | ||
500 'Internal Server Error'; | ||
501 'Not Implemented'; | ||
502 'Bad Gateway'; | ||
503 'Service Unavailable'; | ||
504 'Gateway Timeout'; | ||
} | ||
|
||
include /etc/nginx/conf.d/variables.conf; | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | ||
415 416 417 418 421 422 423 424 426 428 429 431 451 500 501 502 503 | ||
504 505 506 507 508 510 511 /error.html; | ||
|
||
location = /error.html { | ||
ssi on; | ||
internal; | ||
root /usr/share/nginx/html; | ||
} | ||
|
||
location = /record-manager { | ||
return 302 $record_manager_origin$record_manager_root_path/; | ||
} | ||
|
||
location /record-manager/ { | ||
proxy_pass http://record-manager/; # keep the trailing slash to cut off matched prefix | ||
} | ||
|
||
location /record-manager/services/record-manager-server/ { | ||
proxy_pass http://record-manager-server:8080/record-manager/; # keep the trailing slash to cut off matched prefix | ||
proxy_cookie_path /record-manager $record_manager_root_path/services; | ||
} | ||
|
||
location = /record-manager/services/db-server { | ||
return 302 $record_manager_origin$record_manager_root_path/services/db-server/; | ||
} | ||
|
||
location /record-manager/services/db-server/ { | ||
proxy_pass http://db-server:7200/; # keep the trailing slash to cut off matched prefix | ||
} | ||
|
||
location /record-manager/services/s-pipes/ { | ||
proxy_pass http://s-pipes-engine:8080/; # keep the trailing slash to cut off matched prefix | ||
} | ||
|
||
location /health-check { | ||
return 200; | ||
access_log off; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
map $host $record_manager_origin { | ||
default "$RECORD_MANAGER_ORIGIN"; | ||
} | ||
|
||
map $host $record_manager_root_path { | ||
default "$RECORD_MANAGER_ROOT_PATH"; | ||
} |
Oops, something went wrong.