Merge branch 'dmp-refactoring' of code-repo.d4science.org:MaDgiK-CITE/argos into dmp-refactoring

This commit is contained in:
Efstratios Giannopoulos 2024-04-26 12:19:57 +03:00
commit 8722e15750
30 changed files with 329 additions and 272 deletions

View File

@ -11,7 +11,7 @@ DOCX_APP_TAG=0.0.8
JSON_APP_TAG=0.0.6 JSON_APP_TAG=0.0.6
ZENODO_APP_TAG=2.0.4 ZENODO_APP_TAG=2.0.4
POSTGRES_TAG=16-alpine POSTGRES_TAG=16-alpine
ELK_VERSION=8.13.12 ELK_VERSION=8.13.0
KEYCLOAK_TAG=24.0.2 KEYCLOAK_TAG=24.0.2
RABBITMQ_TAG=3.13-management RABBITMQ_TAG=3.13-management
GOTENBERG_TAG=8.4.0 GOTENBERG_TAG=8.4.0

View File

@ -1,23 +1,24 @@
services: services:
############################## PROXY ######################################## ############################## PROXY ########################################
# opendmp.proxy: opendmp.proxy:
# user: ${DEPLOY_USER}:${DEPLOY_GROUP} user: ${DEPLOY_USER}:${DEPLOY_GROUP}
# restart: unless-stopped restart: unless-stopped
# cpus: 1 cpus: 1
# mem_limit: 256m mem_limit: 256m
# ports: ports:
# - "${PROXY_APP_PORT}:8081" - "${PROXY_APP_PORT}:8081"
# - "${PROXY_MS_PORT}:8082" - "${PROXY_MS_PORT}:8082"
# env_file: env_file:
# - proxy/proxy.env - ./proxy/proxy.env
# volumes: volumes:
# - proxy/nginx.conf:/etc/nginx/nginx.conf # - ./proxy/template-variables:/etc/nginx/templates/10-variables.conf.template:ro
# - proxy/ProxyNginx.conf:/etc/nginx/conf.d/default.conf - ./proxy/nginx.conf:/etc/nginx/nginx.conf
# - proxy/nginx-selfsigned.crt:/certifcates/cert.crt - ./proxy/ProxyNginx.conf:/etc/nginx/conf.d/default.conf
# - proxy/nginx-selfsigned.key:/certifcates/key.key - ./proxy/nginx-selfsigned.crt:/certifcates/cert.crt
# - logs/proxy:/tmp/logs - ./proxy/nginx-selfsigned.key:/certifcates/key.key
# networks: - ./logs/proxy:/tmp/logs
# - opendmp-proxy-network networks:
- opendmp-proxy-network
############################## OPENDMP APP ################################# ############################## OPENDMP APP #################################
# opendmp.backend: # opendmp.backend:
@ -171,67 +172,73 @@ services:
# - "127.0.0.1:${POSTGRES_PORT}:5432" # If you want to make it accessible locally only # - "127.0.0.1:${POSTGRES_PORT}:5432" # If you want to make it accessible locally only
- "${POSTGRES_PORT}:5432" - "${POSTGRES_PORT}:5432"
env_file: env_file:
- postgres/postgres.env - ./postgres/postgres.env
volumes: volumes:
- ./storage/postgres/data:/var/lib/postgresql/data - ./storage/postgres/data:/var/lib/postgresql/data
networks: networks:
- opendmp-postgres-shared-network - opendmp-postgres-shared-network
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U opendmp-psql -d opendmp'"]
interval: 15s
timeout: 60s
retries: 5
################################# ELK ################################################# ################################# ELK #################################################
# opendmp.elasticsearch: # opendmp.elasticsearch:
# user: ${DEPLOY_USER}:${DEPLOY_GROUP} # user: ${DEPLOY_USER}:${DEPLOY_GROUP}
# group_add: # group_add:
# - 0 # - 0
# restart: unless-stopped # restart: unless-stopped
# cpus: 2 # cpus: 2
# mem_limit: 1024m # mem_limit: 1024m
# env_file: # env_file:
# - elk/config-elk/elasticsearch/elastic.env # - elk/config-elk/elasticsearch/elastic.env
# environment: # environment:
# - "ES_JAVA_OPTS=-Xmx512m -Xms512m" # - ES_JAVA_OPTS=-Xmx512m -Xms512m
# ulimits: # ulimits:
# nproc: 65535 # nproc: 65535
# memlock: # memlock:
# soft: -1 # soft: -1
# hard: -1 # hard: -1
# volumes: # volumes:
# - elk/config-elk/elasticsearch/certificates:/usr/share/elasticsearch/config/certificates # - ./elk/config-elk/elasticsearch/certificates:/usr/share/elasticsearch/config/certificates
# - elk/config-elk/elasticsearch/config/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties:ro # - ./elk/config-elk/elasticsearch/config/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties:ro
# - elk/config-elk/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro # - ./elk/config-elk/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
# - elk/data-elk/elasticsearch-data:/usr/share/elasticsearch/data # - ./elk/data-elk/elasticsearch-data:/usr/share/elasticsearch/data
# - elk/data-elk/elasticsearch-log:/usr/share/elasticsearch/logs # - ./elk/data-elk/elasticsearch-log:/usr/share/elasticsearch/logs
# expose: # expose:
# - "9200" # - "9200"
# - "9300" # - "9300"
# networks: # networks:
# - opendmp-elastic-network # - opendmp-elastic-network
# - opendmp-elastic-shared-network # - opendmp-elastic-shared-network
# healthcheck: # healthcheck:
# test: curl --cacert /usr/share/elasticsearch/config/certificates/ca/ca.crt -s https://localhost:9200 >/dev/null; if [[ $$? == 52 ]]; then echo 0; else echo 1; fi # test: curl --cacert /usr/share/elasticsearch/config/certificates/ca/ca.crt -s https://localhost:9200 >/dev/null; if [[ $$? == 52 ]]; then echo 0; else echo 1; fi
# interval: 30s # interval: 30s
# timeout: 10s # timeout: 10s
# retries: 5 # retries: 5
# # opendmp.logstash: # # opendmp.logstash:
# # volumes: # # volumes:
# # - /elk/data-elk/logstash-log:/usr/share/logstash/logs # # - /elk/data-elk/logstash-log:/usr/share/logstash/logs
# opendmp.kibana: # opendmp.kibana:
# user: ${DEPLOY_USER}:${DEPLOY_GROUP} # user: ${DEPLOY_USER}:${DEPLOY_GROUP}
# restart: unless-stopped # restart: unless-stopped
# cpus: 2 # cpus: 2
# mem_limit: 1024m # mem_limit: 1024m
# environment: # environment:
# - xpack.license.self_generated.type=basic # - xpack.license.self_generated.type=basic
# - xpack.security.enabled=true # - xpack.security.enabled=true
# volumes: # volumes:
# - elk/config-elk/kibana/certificates:/usr/share/kibana/certificates # - ./elk/config-elk/kibana/certificates:/usr/share/kibana/certificates
# - elk/config-elk/kibana/certificates/ca:/usr/share/kibana/certificate_authorities # - ./elk/config-elk/kibana/certificates/ca:/usr/share/kibana/certificate_authorities
# - elk/config-elk/kibana/config:/usr/share/kibana/config:ro # - ./elk/config-elk/kibana/config:/usr/share/kibana/config:ro
# expose: # expose:
# - "5601" # - "5601"
# networks: # networks:
# - opendmp-elastic-network # - opendmp-elastic-network
# # opendmp.filebeat: # # opendmp.filebeat:
@ -240,6 +247,7 @@ services:
opendmp.keycloak: opendmp.keycloak:
restart: unless-stopped restart: unless-stopped
command: ["start", "--log=console,file", "--log-file=/tmp/logs/keycloak.log", "--import-realm"] command: ["start", "--log=console,file", "--log-file=/tmp/logs/keycloak.log", "--import-realm"]
# command: ["start", "--log=console,file", "--log-file=/tmp/logs/keycloak.log"]
cpus: 1 cpus: 1
mem_limit: 1024M mem_limit: 1024M
security_opt: security_opt:
@ -249,10 +257,10 @@ services:
environment: environment:
- JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=true" - JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=true"
volumes: volumes:
- logs/keycloak:/tmp/logs - ./logs/keycloak:/tmp/logs
- keycloak/imports/opendmp-realm.json:/opt/keycloak/data/import/opendmp-realm.json - ./keycloak/imports/opendmp-realm.json:/opt/keycloak/data/import/opendmp-realm.json
- keycloak/certs/keycloak-selfsigned.crt:/tmp/keycloak-selfsigned.crt:ro - ./keycloak/certs/keycloak-selfsigned.crt:/tmp/keycloak-selfsigned.crt:ro
- keycloak/certs/keycloak-selfsigned.key:/tmp/keycloak-selfsigned.key:ro - ./keycloak/certs/keycloak-selfsigned.key:/tmp/keycloak-selfsigned.key:ro
expose: expose:
- "8443" - "8443"
networks: networks:
@ -261,34 +269,34 @@ services:
- opendmp-keycloak-shared-network - opendmp-keycloak-shared-network
# ############################## RABBITMQ ############################################### # ############################## RABBITMQ ###############################################
# opendmp.rabbitmq: opendmp.rabbitmq:
# labels: labels:
# NAME: "rabbitmq" NAME: "rabbitmq"
# cpus: 1 cpus: 1
# mem_limit: 512m mem_limit: 512m
# restart: unless-stopped restart: unless-stopped
# expose: ports:
# - "15672" - "0.0.0.0:15672:15672"
# - "5672" - "0.0.0.0:5672:5672"
# env_file: env_file:
# - rabbitmq/rabbitmq.env - rabbitmq/rabbitmq.env
# # volumes: volumes:
# # - /rabbitmq/rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro - /rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
# networks: networks:
# - opendmp-proxy-network - opendmp-proxy-network
# - opendmp-rabbitmq-shared-network - opendmp-rabbitmq-shared-network
# ############################## GOTENBERG ############################################## # ############################## GOTENBERG ##############################################
# opendmp.gotenberg: opendmp.gotenberg:
# mem_limit: 2048m mem_limit: 2048m
# restart: unless-stopped restart: unless-stopped
# expose: expose:
# - "3000" - "3000"
# hostname: gotenberg hostname: gotenberg
# env_file: env_file:
# - gotenberg/gotenberg.env - gotenberg/gotenberg.env
# networks: networks:
# - opendmp-gotenberg-shared-network - opendmp-gotenberg-shared-network
networks: networks:
opendmp-elastic-network: opendmp-elastic-network:

View File

@ -1,8 +1,11 @@
services: services:
############################## PROXY ######################################## ############################## PROXY ########################################
# opendmp.proxy: opendmp.proxy:
# container_name: opendmp.proxy container_name: opendmp.proxy
# image: nginx:${PROXY_TAG} image: nginx:${PROXY_TAG}
depends_on:
- opendmp.keycloak
# - opendmp.kibana
# ############################## OPENDMP APP ################################# # ############################## OPENDMP APP #################################
@ -63,13 +66,15 @@ services:
POSTGRES_TAG: $POSTGRES_TAG POSTGRES_TAG: $POSTGRES_TAG
################################# ELK ################################################# ################################# ELK #################################################
# opendmp.elasticsearch: # opendmp.elasticsearch:
# container_name: opendmp.elasticsearch # container_name: opendmp.elasticsearch
# image: elasticsearch # image: elasticsearch
# build: # build:
# context: /elk/elasticsearch/ # context: ./elk/elasticsearch/
# args: # args:
# ELK_VERSION: $ELK_VERSION # ELK_VERSION: $ELK_VERSION
# DEPLOY_USER : $DEPLOY_USER
# DEPLOY_GROUP : $DEPLOY_GROUP
# # opendmp.logstash: # # opendmp.logstash:
# # container_name: opendmp.logstash # # container_name: opendmp.logstash
@ -81,15 +86,17 @@ services:
# # depends_on: # # depends_on:
# # - opendmp.elasticsearch # # - opendmp.elasticsearch
# opendmp.kibana: # opendmp.kibana:
# container_name: opendmp.kibana # container_name: opendmp.kibana
# image: kibana # image: kibana
# build: # build:
# context: /elk/kibana/ # context: ./elk/kibana/
# args: # args:
# ELK_VERSION: $ELK_VERSION # ELK_VERSION: $ELK_VERSION
# depends_on: # DEPLOY_USER : $DEPLOY_USER
# - opendmp.elasticsearch # DEPLOY_GROUP : $DEPLOY_GROUP
# depends_on:
# - opendmp.elasticsearch
# # opendmp.filebeat: # # opendmp.filebeat:
# # container_name: opendmp.filebeat # # container_name: opendmp.filebeat
@ -105,13 +112,16 @@ services:
opendmp.keycloak: opendmp.keycloak:
container_name: opendmp.keycloak container_name: opendmp.keycloak
image: quay.io/keycloak/keycloak:${KEYCLOAK_TAG} image: quay.io/keycloak/keycloak:${KEYCLOAK_TAG}
depends_on:
opendmp.postgres:
condition: service_healthy
# ############################## RABBITMQ ############################################### # ############################## RABBITMQ ###############################################
# opendmp.rabbitmq: opendmp.rabbitmq:
# container_name: opendmp.rabbitmq container_name: opendmp.rabbitmq
# image: rabbitmq:${RABBITMQ_TAG} image: rabbitmq:${RABBITMQ_TAG}
# ############################## GOTENBERG ############################################## # ############################## GOTENBERG ##############################################
# opendmp.gotenberg: opendmp.gotenberg:
# image: gotenberg/gotenberg:${GOTENBERG_TAG} image: gotenberg/gotenberg:${GOTENBERG_TAG}
# container_name: opendmp.gotenberg container_name: opendmp.gotenberg

View File

@ -1,18 +1,23 @@
ARG ELK_VERSION ARG ELK_VERSION
ARG DEPLOY_USER ARG DEPLOY_USER
ARG DEPLOY_GROUP
# https://github.com/elastic/elasticsearch-docker # https://github.com/elastic/elasticsearch-docker
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION} FROM docker.elastic.co/elasticsearch/elasticsearch:${ELK_VERSION}
ARG DEPLOY_USER
ARG DEPLOY_GROUP
ENV DEPLOY_USER $DEPLOY_USER
ENV DEPLOY_GROUP $DEPLOY_GROUP
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu && \ RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu && \
/usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic
USER root USER root
RUN groupmod -g ${DEPLOY_USER} elasticsearch RUN groupmod -g ${DEPLOY_GROUP} elasticsearch
RUN usermod -u ${DEPLOY_USER} -g ${DEPLOY_USER} elasticsearch RUN usermod -u ${DEPLOY_USER} -g ${DEPLOY_GROUP} elasticsearch
RUN chown -R elasticsearch /usr/share/elasticsearch RUN chown -R elasticsearch /usr/share/elasticsearch
RUN sed -i -e 's/--userspec=1000/--userspec=${DEPLOY_USER}/g' \ RUN sed -i -e 's/--userspec=1000/--userspec=1000/g' \
-e 's/UID 1000/UID ${DEPLOY_USER}/' \ -e 's/UID 1000/UID 1000/' \
-e 's/chown -R 1000/chown -R ${DEPLOY_USER}/' /usr/local/bin/docker-entrypoint.sh -e 's/chown -R 1000/chown -R 1000/' /usr/local/bin/docker-entrypoint.sh
RUN chown elasticsearch /usr/local/bin/docker-entrypoint.sh RUN chown elasticsearch /usr/local/bin/docker-entrypoint.sh
ENV JAVA_HOME /usr/share/elasticsearch/jdk ENV JAVA_HOME /usr/share/elasticsearch/jdk

View File

@ -1,14 +1,21 @@
ARG ELK_VERSION ARG ELK_VERSION
ARG DEPLOY_USER
ARG DEPLOY_GROUP
# https://github.com/elastic/kibana-docker # https://github.com/elastic/kibana-docker
FROM docker.elastic.co/kibana/kibana:${ELK_VERSION} FROM docker.elastic.co/kibana/kibana:${ELK_VERSION}
ARG DEPLOY_USER
ARG DEPLOY_GROUP
ENV DEPLOY_USER $DEPLOY_USER
ENV DEPLOY_GROUP $DEPLOY_GROUP
USER root USER root
RUN groupmod -g 1008 kibana RUN groupmod -g ${DEPLOY_GROUP} kibana
RUN usermod -u 1008 -g 1008 kibana RUN usermod -u ${DEPLOY_USER} -g ${DEPLOY_GROUP} kibana
RUN chown -R kibana /usr/share/kibana RUN chown -R kibana /usr/share/kibana
USER 1008:1008 USER ${DEPLOY_USER}:${DEPLOY_GROUP}
# Add your kibana plugins setup here # Add your kibana plugins setup here
# Example: RUN kibana-plugin install <name|url> # Example: RUN kibana-plugin install <name|url>

View File

@ -5,14 +5,15 @@ KC_DB_URL_HOST=opendmp.postgres
KC_DB_SCHEMA=public KC_DB_SCHEMA=public
KC_DB_URL_DATABASE=keycloak KC_DB_URL_DATABASE=keycloak
KC_DB_PORT=5432 KC_DB_PORT=5432
KC_DB_USERNAME=keycloak-admin KC_DB_USERNAME=keycloak-psql
KC_DB_PASSWORD=admin KC_DB_PASSWORD=keycloak-admin
#Keycloak related configuration #Keycloak related configuration
KEYCLOAK_ADMIN=opendmp-admin KEYCLOAK_ADMIN=keycloak-admin
KEYCLOAK_ADMIN_PASSWORD=admin KEYCLOAK_ADMIN_PASSWORD=admin
KC_HOSTNAME_URL=https://localhost:8082 KC_HOSTNAME_URL=https://localhost:8082/keycloak
KC_HOSTNAME_ADMIN_URL=https://localhost:8082 KC_HOSTNAME_ADMIN_URL=https://localhost:8082/keycloak
KC_HTTP_RELATIVE_PATH=/keycloak
KC_PROXY_HEADERS=xforwarded KC_PROXY_HEADERS=xforwarded
KC_HOSTNAME_STRICT_HTTPS=true KC_HOSTNAME_STRICT_HTTPS=true
KC_HOSTNAME_STRICT_BACKCHANNEL=true KC_HOSTNAME_STRICT_BACKCHANNEL=true

View File

@ -3,7 +3,6 @@ ARG DEPLOY_USER
ARG DEPLOY_GROUP ARG DEPLOY_GROUP
FROM postgres:${POSTGRES_TAG} FROM postgres:${POSTGRES_TAG}
COPY ./opendmp_init.sql /docker-entrypoint-initdb.d/ COPY ./opendmp_init.sql /docker-entrypoint-initdb.d/
COPY ./keycloak_init.sql /docker-entrypoint-initdb.d/
COPY ./user_init.sql /docker-entrypoint-initdb.d/ COPY ./user_init.sql /docker-entrypoint-initdb.d/
ENTRYPOINT ["docker-entrypoint.sh"] ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 5432 EXPOSE 5432

View File

@ -1,12 +1,3 @@
--
-- PostgreSQL database dump
--
-- Dumped from database version 16.2
-- Dumped by pg_dump version 16.2
-- Started on 2024-04-25 13:31:48
SET statement_timeout = 0; SET statement_timeout = 0;
SET lock_timeout = 0; SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0; SET idle_in_transaction_session_timeout = 0;
@ -20,13 +11,13 @@ SET row_security = off;
-- --
-- TOC entry 4132 (class 1262 OID 49907) -- TOC entry 4132 (class 1262 OID 49907)
-- Name: opendmp-test; Type: DATABASE; Schema: -; Owner: - -- Name: opendmp; Type: DATABASE; Schema: -; Owner: -
-- --
CREATE DATABASE "opendmp-test" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.utf8'; CREATE DATABASE "opendmp" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.utf8';
\connect -reuse-previous=on "dbname='opendmp-test'" \connect -reuse-previous=on "dbname='opendmp'"
SET statement_timeout = 0; SET statement_timeout = 0;
SET lock_timeout = 0; SET lock_timeout = 0;

View File

@ -1,4 +1,3 @@
#################### POSTGRES ######################## #################### POSTGRES ########################
POSTGRES_USER=postgres POSTGRES_USER=postgres
POSTGRES_PASSWORD=changeme POSTGRES_PASSWORD=postgres-admin
PGDATA=/var/lib/postgresql/data/

View File

@ -1,4 +1,4 @@
CREATE USER keycloak_psql WITH PASSWORD 'keycloak-admin'; CREATE USER "keycloak-psql" WITH PASSWORD 'keycloak-admin';
ALTER DATABASE keycloak OWNER TO keycloak_psql; CREATE DATABASE keycloak WITH OWNER "keycloak-psql";
CREATE USER opendmp_psql WITH PASSWORD 'opendmp-admin'; CREATE USER "opendmp-psql" WITH PASSWORD 'opendmp-admin';
ALTER DATABASE "opendmp-test" OWNER TO opendmp_psql; ALTER DATABASE "opendmp" OWNER TO "opendmp-psql";

View File

@ -6,6 +6,8 @@ server {
} }
server { server {
set $app_host $APP_HOST;
set $app_port $APP_PORT;
listen 8080; listen 8080;
server_name ${APP_HOST}${APP_PORT}; server_name ${APP_HOST}${APP_PORT};
location / { location / {
@ -13,74 +15,88 @@ server {
} }
} }
# server {
# set $app_host $APP_HOST;
# set $app_port $APP_PORT;
# listen 8081 ssl;
# ssl_certificate /certifcates/cert.crt;
# ssl_certificate_key /certifcates/key.key;
# server_name ${APP_HOST}${APP_PORT};
# proxy_pass_header Server;
# add_header X-XSS-Protection "1; mode=block" always;
# add_header X-Content-Type-Options nosniff;
# add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
# add_header Referrer-Policy 'strict-origin' always;
# add_header Feature-Policy "usb 'none'; xr-spatial-tracking 'none'" always;
# add_header Permissions-Policy "geolocation=(),sync-xhr=(),microphone=(),camera=(),magnetometer=(),gyroscope=()" always;
# location / {
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# # Fix the “It appears that your reverse proxy set up is broken" error.
# proxy_pass http://opendmp.frontend:8080;
# proxy_read_timeout 90;
# proxy_redirect http://opendmp.frontend:8080 https://${APP_HOST}${APP_PORT};
# }
# location /api/ {
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# # Fix the “It appears that your reverse proxy set up is broken" error.
# proxy_pass http://opendmp.backend:8080;
# proxy_read_timeout 90;
# proxy_redirect http://opendmp.backend:8080 https://${APP_HOST}${APP_PORT}/api;
# }
# location /api/notification/ {
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# # Fix the “It appears that your reverse proxy set up is broken" error.
# proxy_pass http://opendmp.notification:8080;
# proxy_read_timeout 90;
# proxy_redirect http://opendmp.notification:8080 https://${APP_HOST}${APP_PORT}/api/notification;
# }
# location /api/annotation/ {
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# # Fix the “It appears that your reverse proxy set up is broken" error.
# proxy_pass http://opendmp.annotation:8080;
# proxy_read_timeout 90;
# proxy_redirect http://opendmp.annotation:8080 https://${APP_HOST}${APP_PORT}/api/annotation;
# }
# }
server { server {
listen 8081 ssl; set $ms_host $MS_HOST;
ssl_certificate /certifcates/cert.crt; set $ms_port $MS_PORT;
ssl_certificate_key /certifcates/key.key; listen 8080;
server_name ${APP_HOST}${APP_PORT}; server_name ${MS_HOST}${MS_PORT};
proxy_pass_header Server;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options nosniff;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
add_header Referrer-Policy 'strict-origin' always;
add_header Feature-Policy "usb 'none'; xr-spatial-tracking 'none'" always;
add_header Permissions-Policy "geolocation=(),sync-xhr=(),microphone=(),camera=(),magnetometer=(),gyroscope=()" always;
location / { location / {
return 301 https://$host$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://opendmp.frontend:8080;
proxy_read_timeout 90;
proxy_redirect http://opendmp.frontend:8080 https://${APP_HOST}${APP_PORT};
}
location /api/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://opendmp.backend:8080;
proxy_read_timeout 90;
proxy_redirect http://opendmp.backend:8080 https://${APP_HOST}${APP_PORT}/api;
}
location /api/notification/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://opendmp.notification:8080;
proxy_read_timeout 90;
proxy_redirect http://opendmp.notification:8080 https://${APP_HOST}${APP_PORT}/api/notification;
}
location /api/annotation/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://opendmp.annotation:8080;
proxy_read_timeout 90;
proxy_redirect http://opendmp.annotation:8080 https://${APP_HOST}${APP_PORT}/api/annotation;
} }
} }
server { server {
set $ms_host $MS_HOST;
set $ms_port $MS_PORT;
listen 8082 ssl; listen 8082 ssl;
ssl_certificate /certifcates/cert.crt; ssl_certificate /certifcates/cert.crt;
ssl_certificate_key /certifcates/key.key; ssl_certificate_key /certifcates/key.key;
@ -111,23 +127,6 @@ server {
proxy_redirect http://opendmp.keycloak:8443 https://${MS_HOST}${MS_PORT}/keycloak; proxy_redirect http://opendmp.keycloak:8443 https://${MS_HOST}${MS_PORT}/keycloak;
} }
location /rabbitmq/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass https://opendmp.rabbitmq:15672;
proxy_read_timeout 90;
proxy_redirect http://opendmp.rabbitmq:15672 https://${MS_HOST}${MS_PORT}/rabbitmq;
}
location /elastic/ { location /elastic/ {
proxy_set_header Host $host; proxy_set_header Host $host;

View File

@ -0,0 +1,2 @@
deprecated_features.permit.management_metrics_collection = false
proxy_protocol = true

View File

@ -1,3 +1,3 @@
RABBITMQ_DEFAULT_USER=guest RABBITMQ_DEFAULT_USER=guest
RABBITMQ_DEFAULT_PASS=guest RABBITMQ_DEFAULT_PASS=guest
RABBITMQ_DEFAULT_VHOST=/rabbitmq/ RABBITMQ_DEFAULT_VHOST=/

View File

@ -307,7 +307,6 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
startWith(null), startWith(null),
debounceTime(this.requestDelay), debounceTime(this.requestDelay),
distinctUntilChanged(), distinctUntilChanged(),
distinctUntilChanged(),
mergeMap(query => this.filter(query)), mergeMap(query => this.filter(query)),
catchError(error => { catchError(error => {
this._items = null; this._items = null;

View File

@ -37,7 +37,7 @@
</mat-option> </mat-option>
</ng-container> </ng-container>
<ng-template #noItems> <ng-template #noItems>
<mat-option *ngIf="(queryValue || loadDataOnStart) && queryValue == inputValue" disabled="true">No results found!</mat-option> <mat-option disabled="true">No results found!</mat-option>
</ng-template> </ng-template>
</div> </div>
<ng-template #loading> <ng-template #loading>

View File

@ -8,8 +8,8 @@ import { MatFormFieldControl } from '@angular/material/form-field';
import { AutoCompleteGroup } from '@app/library/auto-complete/auto-complete-group'; import { AutoCompleteGroup } from '@app/library/auto-complete/auto-complete-group';
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration'; import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
import { BaseComponent } from '@common/base/base.component'; import { BaseComponent } from '@common/base/base.component';
import { Observable, Subject, of as observableOf } from 'rxjs'; import { Observable, Subject, of as observableOf, of } from 'rxjs';
import { debounceTime, distinctUntilChanged, map, startWith, switchMap, takeUntil, tap } from 'rxjs/operators'; import { catchError, debounceTime, distinctUntilChanged, map, mergeMap, startWith, switchMap, takeUntil, tap } from 'rxjs/operators';
export class CustomComponentBase extends BaseComponent { export class CustomComponentBase extends BaseComponent {
@ -64,8 +64,6 @@ export class SingleAutoCompleteComponent extends _CustomComponentMixinBase imple
_groupedItems: Observable<AutoCompleteGroup[]>; _groupedItems: Observable<AutoCompleteGroup[]>;
_selectedItems: Map<string, any> = new Map<any, any>(); _selectedItems: Map<string, any> = new Map<any, any>();
queryValue: string = "";
get empty() { return (this.value == null) && (!this.inputValue || this.inputValue.length === 0); } get empty() { return (this.value == null) && (!this.inputValue || this.inputValue.length === 0); }
get shouldLabelFloat() { return this.focused || !this.empty; } get shouldLabelFloat() { return this.focused || !this.empty; }
@ -220,7 +218,7 @@ export class SingleAutoCompleteComponent extends _CustomComponentMixinBase imple
// prevent filtering results if arrow were pressed // prevent filtering results if arrow were pressed
if (event.keyCode !== ENTER && (event.keyCode < 37 || event.keyCode > 40)) { if (event.keyCode !== ENTER && (event.keyCode < 37 || event.keyCode > 40)) {
if (this.inputValue.length === 0 && this.value != null) { if (this.inputValue.length === 0 && this.value != null) {
this.optionSelectedInternal(null); this._onInputFocus();
} }
this._inputSubject.next(this.inputValue); this._inputSubject.next(this.inputValue);
} }
@ -237,9 +235,13 @@ export class SingleAutoCompleteComponent extends _CustomComponentMixinBase imple
startWith(null), startWith(null),
debounceTime(this.requestDelay), debounceTime(this.requestDelay),
distinctUntilChanged(), distinctUntilChanged(),
tap(query => this.queryValue = query), mergeMap(query => this.filter(query)),
switchMap(query => this.filter(query))); catchError(error => {
this._items = null;
console.error(error);
return of(null)
})
);
if (this.configuration.groupingFn) { this._groupedItems = this._items.pipe(map(items => this.configuration.groupingFn(items))); } if (this.configuration.groupingFn) { this._groupedItems = this._items.pipe(map(items => this.configuration.groupingFn(items))); }
} }
} }

View File

@ -11,25 +11,26 @@ import { ReferenceTypeEditorResolver } from './editor/reference-type-editor.reso
const routes: Routes = [ const routes: Routes = [
{ {
path: '', path: '',
component: ReferenceTypeListingComponent, component: ReferenceTypeListingComponent,
canActivate: [AuthGuard] canActivate: [AuthGuard]
}, },
{ {
path: 'new', path: 'new',
component: ReferenceTypeEditorComponent, component: ReferenceTypeEditorComponent,
canActivate: [AdminAuthGuard], canActivate: [AuthGuard],
data: { canDeactivate: [PendingChangesGuard],
authContext: { data: {
permissions: [AppPermission.EditReferenceType] authContext: {
}, permissions: [AppPermission.EditReferenceType]
...BreadcrumbService.generateRouteDataConfiguration({ },
title: 'BREADCRUMBS.NEW-REFERENCE-TYPE' ...BreadcrumbService.generateRouteDataConfiguration({
}) title: 'BREADCRUMBS.NEW-REFERENCE-TYPE'
} })
}, }
{ },
{
path: ':id', path: ':id',
canActivate: [AuthGuard], canActivate: [AuthGuard],
component: ReferenceTypeEditorComponent, component: ReferenceTypeEditorComponent,
@ -47,7 +48,7 @@ const routes: Routes = [
} }
}, },
{ path: '**', loadChildren: () => import('@common/modules/page-not-found/page-not-found.module').then(m => m.PageNotFoundModule) }, { path: '**', loadChildren: () => import('@common/modules/page-not-found/page-not-found.module').then(m => m.PageNotFoundModule) },
]; ];
@NgModule({ @NgModule({

View File

@ -1,5 +1,10 @@
--- ---
sidebar_position: 1 sidebar_position: 1
description: View details about the field types
--- ---
# Field Types # Field Types
import FieldTypes from '../commons/_markdown-field-types.md';
<FieldTypes />

View File

@ -90,7 +90,7 @@ Every section must have a `System` field of the following types: `Title`, `Descr
::: :::
### Desctiption Templates form ### Description Templates form
Each section can have one or more **description templates** attached to it. When you 'attach' a [description template](/docs/documentation/administration/templates/) to a blueprint, every [plan](/docs/category/plans) that inherits from that blueprint must have a [description](/docs/category/descriptions) that inherits from that template. More details will follow. You can add a description template by clicking on the `Add Description Template` button. For every template you add, a new form part appears where you can specify everything about the template attachment. You can also delete one template clicking on the `delete` icon on the right end of its form. Each section can have one or more **description templates** attached to it. When you 'attach' a [description template](/docs/documentation/administration/templates/) to a blueprint, every [plan](/docs/category/plans) that inherits from that blueprint must have a [description](/docs/category/descriptions) that inherits from that template. More details will follow. You can add a description template by clicking on the `Add Description Template` button. For every template you add, a new form part appears where you can specify everything about the template attachment. You can also delete one template clicking on the `delete` icon on the right end of its form.

View File

@ -1,5 +1,6 @@
--- ---
sidebar_position: 3 sidebar_position: 3
description: View details about the prefilling sources
--- ---
# Prefilling Configurations # Prefilling Configurations

View File

@ -1,5 +1,10 @@
--- ---
sidebar_position: 2 sidebar_position: 2
description: View details about the semantics
--- ---
# Semantics # Semantics
import Semantics from '../commons/_markdown-semantics.md';
<Semantics />

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
TODO: Add info about field types

View File

@ -0,0 +1 @@
TODO: Add info about semantics

View File

@ -1,8 +1,8 @@
# Administration # Administration
There are a lot of tools developed that can help administrators better manage a lot of aspects of the application or get a better idea about the usage of the platform. There are a lot of views developed that can help administrators better manage and configure a lot of aspects of the application or get a better idea about the usage of the platform.
These tools will be described in this section. These views will be described in this section.
import DocCardList from '@theme/DocCardList'; import DocCardList from '@theme/DocCardList';

View File

@ -11,3 +11,6 @@ There are a lot of views in the application available only for users that are gi
- **Tenants**: Being able to control the tenants of the platform. Think of tenants as different organisations that can use the application independently at the same time without the need of different deployments. - **Tenants**: Being able to control the tenants of the platform. Think of tenants as different organisations that can use the application independently at the same time without the need of different deployments.
- **Notification Templates**: Being able to modify the structure of notifications sent to users based on different events. - **Notification Templates**: Being able to modify the structure of notifications sent to users based on different events.
- **Languages**: Being able to add support for more languages or modify existing ones. - **Languages**: Being able to add support for more languages or modify existing ones.
- **Reference Types**: Being able to configure static or external data sources that are made available as autocomplete fields on the forms of the platform.
- **Plan Blueprints**: Being able to control the blueprints available for [plans](/docs/category/plans).
- **Description Templates**: Being able to control the templates available for [descriptions](/docs/category/descriptions)

View File

@ -1,5 +1,6 @@
--- ---
sidebar_position: 2 sidebar_position: 2
description: View details about the conditional questions
--- ---
# Conditional Questions # Conditional Questions

View File

@ -1,5 +1,10 @@
--- ---
sidebar_position: 1 sidebar_position: 1
description: View details about the field types
--- ---
# Field Types # Field Types
import FieldTypes from '../commons/_markdown-field-types.md';
<FieldTypes />

View File

@ -1,5 +1,10 @@
--- ---
sidebar_position: 3 sidebar_position: 3
description: View details about the semantics
--- ---
# Semantics # Semantics
import Semantics from '../commons/_markdown-semantics.md';
<Semantics />

View File

@ -0,0 +1,6 @@
---
sidebar_position: 11
description: Configure the tenant you are logged in with
---
# Tenant configuration