deployment updates

This commit is contained in:
Diamantis Tziotzios 2024-09-19 15:02:04 +03:00
parent 5a4366e8c1
commit eb76f42fb0
4 changed files with 61 additions and 56 deletions

View File

@ -11,7 +11,7 @@ POSTGRES_TAG=16-alpine
ELK_TAG=8.13.0 ELK_TAG=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 PDF_SERVICE_TAG=8.4.0
#Application configuration #Application configuration
DOCKER_REGISTRY=crepo.cite.gr/ DOCKER_REGISTRY=crepo.cite.gr/
@ -21,3 +21,8 @@ PROFILE=test
SERVER_PORT=8080 SERVER_PORT=8080
PROXY_APP_PORT=8081 PROXY_APP_PORT=8081
POSTGRES_PORT=5432 POSTGRES_PORT=5432
#storage paths
CONFIG_FILES_PATH=./config-files/
LOG_FILES_PATH=./logs/
STORAGE_PATH=./storage/

View File

@ -7,13 +7,13 @@ services:
ports: ports:
- "${PROXY_APP_PORT}:8081" - "${PROXY_APP_PORT}:8081"
volumes: volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf - ${CONFIG_FILES_PATH}proxy/nginx.conf:/etc/nginx/nginx.conf
- ./proxy/ProxyNginx.conf:/etc/nginx/conf.d/default.conf - ${CONFIG_FILES_PATH}proxy/ProxyNginx.conf:/etc/nginx/conf.d/default.conf
- ./logs/proxy:/tmp/logs - ${LOG_FILES_PATH}proxy:/tmp/logs
networks: networks:
- opencdmp-proxy-network - opencdmp-proxy-network
############################## OPENDMP APP ################################# ############################## OPENCDMP APP #################################
opencdmp.backend: opencdmp.backend:
restart: unless-stopped restart: unless-stopped
cpus: 1 cpus: 1
@ -23,13 +23,13 @@ services:
ports: ports:
- "0.0.0.0:50030:8080" - "0.0.0.0:50030:8080"
volumes: volumes:
- ./opencdmp/backend/config:/config - ${CONFIG_FILES_PATH}opencdmp/backend/config:/config
- ./opencdmp/backend/certificates:/certificates - ${CONFIG_FILES_PATH}opencdmp/backend/certificates:/certificates
- ./opencdmp/backend/i18n:/i18n - ${CONFIG_FILES_PATH}opencdmp/backend/i18n:/i18n
- ./opencdmp/backend/material:/material - ${CONFIG_FILES_PATH}opencdmp/backend/material:/material
- ./opencdmp/backend/Semantics.json:/Semantics.json - ${CONFIG_FILES_PATH}opencdmp/backend/Semantics.json:/Semantics.json
- ./storage/opencdmp/backend:/storage - ${STORAGE_PATH}opencdmp/backend:/storage
- ./logs/opencdmp/backend:/logs - ${LOG_FILES_PATH}opencdmp/backend:/logs
networks: networks:
- opencdmp-proxy-network - opencdmp-proxy-network
- opencdmp-backend-network - opencdmp-backend-network
@ -46,9 +46,9 @@ services:
ports: ports:
- "0.0.0.0:50031:8080" - "0.0.0.0:50031:8080"
volumes: volumes:
- ./opencdmp/frontend/config.json:/usr/share/nginx/html/assets/config/config.json - ${CONFIG_FILES_PATH}opencdmp/frontend/config.json:/usr/share/nginx/html/assets/config/config.json
- ./opencdmp/frontend/nginx.conf:/etc/nginx/nginx.conf - ${CONFIG_FILES_PATH}opencdmp/frontend/nginx.conf:/etc/nginx/nginx.conf
- ./opencdmp/frontend/WebAppNginx.conf:/etc/nginx/conf.d/default.conf - ${CONFIG_FILES_PATH}opencdmp/frontend/WebAppNginx.conf:/etc/nginx/conf.d/default.conf
networks: networks:
- opencdmp-proxy-network - opencdmp-proxy-network
@ -61,10 +61,10 @@ services:
environment: environment:
- PROFILE=${PROFILE} - PROFILE=${PROFILE}
volumes: volumes:
- ./opencdmp/notification/config:/config - ${CONFIG_FILES_PATH}opencdmp/notification/config:/config
- ./opencdmp/notification/messages:/messages - ${CONFIG_FILES_PATH}opencdmp/notification/messages:/messages
- ./opencdmp/notification/notification_templates:/notification_templates - ${CONFIG_FILES_PATH}opencdmp/notification/notification_templates:/notification_templates
- ./logs/opencdmp/notification:/logs - ${LOG_FILES_PATH}opencdmp/notification:/logs
networks: networks:
- opencdmp-proxy-network - opencdmp-proxy-network
- opencdmp-backend-network - opencdmp-backend-network
@ -81,9 +81,9 @@ services:
environment: environment:
- PROFILE=${PROFILE} - PROFILE=${PROFILE}
volumes: volumes:
- ./opencdmp/annotation/config:/config - ${CONFIG_FILES_PATH}opencdmp/annotation/config:/config
- ./opencdmp/annotation/messages:/messages - ${CONFIG_FILES_PATH}opencdmp/annotation/messages:/messages
- ./logs/opencdmp/annotation:/logs - ${LOG_FILES_PATH}opencdmp/annotation:/logs
networks: networks:
- opencdmp-proxy-network - opencdmp-proxy-network
- opencdmp-backend-network - opencdmp-backend-network
@ -103,9 +103,9 @@ services:
- SERVER_PORT=${SERVER_PORT} - SERVER_PORT=${SERVER_PORT}
- PROFILE=${PROFILE} - PROFILE=${PROFILE}
volumes: volumes:
- ./opencdmp/file-transformer-docx/config:/config - ${CONFIG_FILES_PATH}opencdmp/file-transformer-docx/config:/config
- ./logs/opencdmp/file-transformer-docx:/logs - ${LOG_FILES_PATH}opencdmp/file-transformer-docx:/logs
# - ./storage/opencdmp/file-transformer-docx:/storage # - ${STORAGE_PATH}opencdmp/file-transformer-docx:/storage
networks: networks:
- opencdmp-plugins-network - opencdmp-plugins-network
- opencdmp-gotenberg-shared-network - opencdmp-gotenberg-shared-network
@ -120,10 +120,10 @@ services:
- SERVER_PORT=${SERVER_PORT} - SERVER_PORT=${SERVER_PORT}
- PROFILE=${PROFILE} - PROFILE=${PROFILE}
volumes: volumes:
- ./opencdmp/file-transformer-rda-json/config:/config - ${CONFIG_FILES_PATH}opencdmp/file-transformer-rda-json/config:/config
- ./opencdmp/file-transformer-rda-json/internal:/internal - ${CONFIG_FILES_PATH}opencdmp/file-transformer-rda-json/internal:/internal
- ./logs/opencdmp/file-transformer-rda-json:/logs - ${LOG_FILES_PATH}opencdmp/file-transformer-rda-json:/logs
# - ./storage/opencdmp/file-transformer-rda-json:/storage # - ${STORAGE_PATH}opencdmp/file-transformer-rda-json:/storage
networks: networks:
- opencdmp-plugins-network - opencdmp-plugins-network
@ -137,10 +137,10 @@ services:
environment: environment:
- PROFILE=${PROFILE} - PROFILE=${PROFILE}
volumes: volumes:
- ./opencdmp/zenodo/config:/config - ${CONFIG_FILES_PATH}opencdmp/zenodo/config:/config
- ./opencdmp/zenodo/zenodo.jpg:/zenodo.jpg - ${CONFIG_FILES_PATH}opencdmp/zenodo/zenodo.jpg:/zenodo.jpg
- ./logs/opencdmp/zenodo:/logs - ${LOG_FILES_PATH}opencdmp/zenodo:/logs
# - ./storage/opencdmp/zenodo:/storage # - ${STORAGE_PATH}opencdmp/zenodo:/storage
networks: networks:
- opencdmp-plugins-network - opencdmp-plugins-network
- opencdmp-keycloak-shared-network - opencdmp-keycloak-shared-network
@ -154,10 +154,10 @@ 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 - ${CONFIG_FILES_PATH}postgres/postgres.env
volumes: volumes:
- ./storage/postgres/data:/var/lib/postgresql/data - ${STORAGE_PATH}postgres/data:/var/lib/postgresql/data
- ./postgres/opencdmp_init.sql:/docker-entrypoint-initdb.d/opencdmp_init.sql - ${CONFIG_FILES_PATH}postgres/opencdmp_init.sql:/docker-entrypoint-initdb.d/opencdmp_init.sql
networks: networks:
- opencdmp-postgres-shared-network - opencdmp-postgres-shared-network
healthcheck: healthcheck:
@ -173,7 +173,7 @@ services:
cpus: 2 cpus: 2
mem_limit: 1024m mem_limit: 1024m
env_file: env_file:
- ./elk/elk.env - ${CONFIG_FILES_PATH}elk/elk.env
environment: environment:
ES_JAVA_OPTS: -Xmx512m -Xms512m ES_JAVA_OPTS: -Xmx512m -Xms512m
ulimits: ulimits:
@ -182,11 +182,11 @@ services:
soft: -1 soft: -1
hard: -1 hard: -1
volumes: volumes:
- ./elk/elasticsearch/index_init.sh:/usr/share/elasticsearch/config/index_init.sh - ${CONFIG_FILES_PATH}elk/elasticsearch/index_init.sh:/usr/share/elasticsearch/config/index_init.sh
- ./elk/elasticsearch/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties:ro - ${CONFIG_FILES_PATH}elk/elasticsearch/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties:ro
- ./elk/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro - ${CONFIG_FILES_PATH}elk/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
- ./storage/elasticsearch:/usr/share/elasticsearch/data - ${STORAGE_PATH}elasticsearch:/usr/share/elasticsearch/data
- ./logs/elasticsearch:/usr/share/elasticsearch/logs - ${LOG_FILES_PATH}elasticsearch:/usr/share/elasticsearch/logs
expose: expose:
- "9200" - "9200"
- "9300" - "9300"
@ -205,13 +205,13 @@ services:
cpus: 2 cpus: 2
mem_limit: 2048M mem_limit: 2048M
env_file: env_file:
- ./keycloak/keycloak.env - ${CONFIG_FILES_PATH}keycloak/keycloak.env
environment: environment:
- JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=true" - JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=true"
volumes: volumes:
- ./logs/keycloak:/tmp/logs - ${LOG_FILES_PATH}keycloak:/tmp/logs
- ./keycloak/user_init.sh:/tmp/user_init.sh - ${CONFIG_FILES_PATH}keycloak/user_init.sh:/tmp/user_init.sh
- ./keycloak/imports/opencdmp-realm.json:/opt/keycloak/data/import/opencdmp-realm.json - ${CONFIG_FILES_PATH}keycloak/imports/opencdmp-realm.json:/opt/keycloak/data/import/opencdmp-realm.json
expose: expose:
- "8080" - "8080"
networks: networks:
@ -230,14 +230,14 @@ services:
- "0.0.0.0:15672:15672" - "0.0.0.0:15672:15672"
- "0.0.0.0:5672:5672" - "0.0.0.0:5672:5672"
env_file: env_file:
- ./rabbitmq/rabbitmq.env - ${CONFIG_FILES_PATH}rabbitmq/rabbitmq.env
volumes: volumes:
- /rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro - ${CONFIG_FILES_PATH}rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
networks: networks:
- opencdmp-rabbitmq-shared-network - opencdmp-rabbitmq-shared-network
################################# GOTENBERG ############################################## ################################# GOTENBERG ##############################################
opencdmp.gotenberg: opencdmp.pdf-service:
cpus: 2 cpus: 2
mem_limit: 2048m mem_limit: 2048m
restart: unless-stopped restart: unless-stopped
@ -245,7 +245,7 @@ services:
- "3000" - "3000"
hostname: gotenberg hostname: gotenberg
env_file: env_file:
- ./gotenberg/gotenberg.env - ${CONFIG_FILES_PATH}gotenberg/gotenberg.env
networks: networks:
- opencdmp-gotenberg-shared-network - opencdmp-gotenberg-shared-network

View File

@ -14,7 +14,7 @@ services:
opencdmp.annotation: opencdmp.annotation:
condition: service_started condition: service_started
############################## OPENDMP APP ################################# ############################## OPENCDMP APP #################################
opencdmp.frontend: opencdmp.frontend:
container_name: opencdmp.frontend container_name: opencdmp.frontend
@ -98,6 +98,6 @@ services:
image: rabbitmq:${RABBITMQ_TAG} image: rabbitmq:${RABBITMQ_TAG}
############################## GOTENBERG ############################################## ############################## GOTENBERG ##############################################
opencdmp.gotenberg: opencdmp.pdf-service:
image: gotenberg/gotenberg:${GOTENBERG_TAG} image: gotenberg/gotenberg:${PDF_SERVICE_TAG}
container_name: opencdmp.gotenberg container_name: opencdmp.pdf-service

View File

@ -2,7 +2,7 @@
IDP_ISSUER_URI=http://host.docker.internal:8081/keycloak/realms/OpenCDMP IDP_ISSUER_URI=http://host.docker.internal:8081/keycloak/realms/OpenCDMP
#PDF #PDF
PDF_CONVERTER_URL=http://opencdmp.gotenberg:3000 PDF_CONVERTER_URL=http://opencdmp.pdf-service:3000
#Storage #Storage
STORAGE_PATH=/storage STORAGE_PATH=/storage