From ddfbcadff54ea17c4716cc9a8135da09d8823958 Mon Sep 17 00:00:00 2001 From: GitInno <86991526+gitnnolabs@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:00:03 -0300 Subject: [PATCH 1/3] Remoneia a pasta .production para .production-template --- .../{.production => .production-template}/.flask | 15 +++++++++++---- .../.metrics | 16 ++++++++-------- .../{.production => .production-template}/.minio | 0 .../.monitoring-apm | 0 .../{.production => .production-template}/.redis | 0 .../.server | 6 ++++-- 6 files changed, 23 insertions(+), 14 deletions(-) rename .envs/{.production => .production-template}/.flask (77%) rename .envs/{.production => .production-template}/.metrics (53%) rename .envs/{.production => .production-template}/.minio (100%) rename .envs/{.production => .production-template}/.monitoring-apm (100%) rename .envs/{.production => .production-template}/.redis (100%) rename .envs/{.production => .production-template}/.server (59%) diff --git a/.envs/.production/.flask b/.envs/.production-template/.flask similarity index 77% rename from .envs/.production/.flask rename to .envs/.production-template/.flask index 2dff11c0..500d4e90 100644 --- a/.envs/.production/.flask +++ b/.envs/.production-template/.flask @@ -16,11 +16,15 @@ OPAC_MONGODB_NAME=opac OPAC_DATABASE_DIR=/app/data # Value for key. Ex: nmN73pR6 -OPAC_SECRET_KEY= +OPAC_SECRET_KEY=NWhWFn_ScpW6YR9yJKDLxg # Name for MongoDB host OPAC_MONGODB_HOST=opac_mongo +# Activate/Desactivate the cache of redis (default: True) +OPAC_CACHE_ENABLED=False + + # -------------------- Journal path ------------------- # ------------------------------------------------------------ @@ -38,10 +42,13 @@ OPAC_SSM_SCHEME=http OPAC_SSM_DOMAIN=minio OPAC_SSM_PORT=9000 -# ----------------- Filter settings --------------------- +# ----------------- Table of contents sections --------------------- # ------------------------------------------------------------ -# (in minutes). Ex: 5 -OPAC_FILTER_SECTION_ENABLE_FOR_MIN_STUDY_AREAS=5 +# This variable active/desactivate the sections on table of contents # Possible values: True or False OPAC_FILTER_SECTION_ENABLE=True + +# This variable define a mininal count of study ares on the head of journal page +OPAC_FILTER_SECTION_ENABLE_FOR_MIN_STUDY_AREAS=5 + diff --git a/.envs/.production/.metrics b/.envs/.production-template/.metrics similarity index 53% rename from .envs/.production/.metrics rename to .envs/.production-template/.metrics index 16491e1c..97b59f44 100644 --- a/.envs/.production/.metrics +++ b/.envs/.production-template/.metrics @@ -3,20 +3,20 @@ # Enable metrics usage # Possible values: True or False -OPAC_USE_METRICS= -OPAC_METRICS_URL= +OPAC_USE_METRICS=True +OPAC_METRICS_URL=http://analytics.scielo.org # Enable Dimensions usage # Possible values: True or False -OPAC_USE_DIMENSIONS= -OPAC_DIMENSIONS_URL= +OPAC_USE_DIMENSIONS=True +OPAC_DIMENSIONS_URL=https://badge.dimensions.ai/details/doi # Enable PlumX metrics # Possible values: True or False -OPAC_USE_PLUMX= -OPAC_PLUMX_METRICS_URL= +OPAC_USE_PLUMX=True +OPAC_PLUMX_METRICS_URL=https://plu.mx/scielo/a # Enable Altmetric metrics # Possible values: True or False -OPAC_USE_ALTMETRIC= -OPAC_ALTMETRIC_METRICS_URL= \ No newline at end of file +OPAC_USE_ALTMETRIC=True +OPAC_ALTMETRIC_METRICS_URL=https://www.altmetric.com/details.php diff --git a/.envs/.production/.minio b/.envs/.production-template/.minio similarity index 100% rename from .envs/.production/.minio rename to .envs/.production-template/.minio diff --git a/.envs/.production/.monitoring-apm b/.envs/.production-template/.monitoring-apm similarity index 100% rename from .envs/.production/.monitoring-apm rename to .envs/.production-template/.monitoring-apm diff --git a/.envs/.production/.redis b/.envs/.production-template/.redis similarity index 100% rename from .envs/.production/.redis rename to .envs/.production-template/.redis diff --git a/.envs/.production/.server b/.envs/.production-template/.server similarity index 59% rename from .envs/.production/.server rename to .envs/.production-template/.server index aa5efa9d..d7e7d665 100644 --- a/.envs/.production/.server +++ b/.envs/.production-template/.server @@ -1,7 +1,9 @@ # ----------------- Server Configuration --------------------- # ------------------------------------------------------------ -OPAC_SERVER_NAME= +# This set the IP that the app will bind to run, default: 0.0.0.0 +OPAC_SERVER_NAME=0.0.0.0 + # Possible values: True or False -OPAC_AUDIT_LOG_NOTIFICATION_ENABLED= +OPAC_AUDIT_LOG_NOTIFICATION_ENABLED=False OPAC_AUDIT_LOG_NOTIFICATION_RECIPIENTS= \ No newline at end of file From d50419935876c3eaa1ba84c241e409d1d49ae1d2 Mon Sep 17 00:00:00 2001 From: GitInno <86991526+gitnnolabs@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:00:22 -0300 Subject: [PATCH 2/3] =?UTF-8?q?Atualiza=20a=20vers=C3=A3o=20da=20lxml.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 51aac11a..8dffeb9a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -44,7 +44,7 @@ idna==3.4 itsdangerous==2.1.2 Jinja2==3.0.0 legendarium==2.0.6 -lxml==4.9.2 +lxml==5.3.0 Mako==1.2.4 MarkupSafe==2.1.2 mongoengine==0.25.0 From c04270cf7dd1cde9cd1c9a9b5fef224bc99e489f Mon Sep 17 00:00:00 2001 From: GitInno <86991526+gitnnolabs@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:01:15 -0300 Subject: [PATCH 3/3] =?UTF-8?q?Garante=20que=20o=20Makefile=20rode=20com?= =?UTF-8?q?=20vers=C3=B5es=20novas=20do=20docker=20compose.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index dd1daa12..81638549 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,13 @@ export OPAC_WEBAPP_VERSION=$(strip $(shell cat VERSION)) export OPAC_BUILD_DATE=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ") export COMMIT=$(strip $(shell git rev-parse --short HEAD)) +# This check if docker compose version +ifneq ($(shell docker compose version 2>/dev/null),) + DOCKER_COMPOSE=docker compose +else + DOCKER_COMPOSE=docker-compose +endif + # Do not remove this block. It is used by the 'help' rule when # constructing the help output. # help: @@ -182,47 +189,47 @@ build_bundles: # help: build - build the containers .PHONY: build build: - @docker-compose -f $(compose) build + $(DOCKER_COMPOSE) -f $(compose) build # help: up - start the containers .PHONY: up up: - @docker-compose -f $(compose) up -d + $(DOCKER_COMPOSE) -f $(compose) up -d # help: logs - show the containers logs .PHONY: logs logs: - @docker-compose -f $(compose) logs -f + $(DOCKER_COMPOSE) -f $(compose) logs -f # help: logs_tail - show the containers logs 50 latest lines .PHONY: logs_tail logs_tail: - @docker-compose -f $(compose) logs -f --tail=50 + $(DOCKER_COMPOSE) -f $(compose) logs -f --tail=50 # help: stop - stop the containers .PHONY: stop stop: - @docker-compose -f $(compose) stop + $(DOCKER_COMPOSE) -f $(compose) stop # help: ps - show the containers Process Status .PHONY: ps ps: - @docker-compose -f $(compose) ps + $(DOCKER_COMPOSE) -f $(compose) ps # help: rm - remove all containers from $(compose) .PHONY: rm rm: - @docker-compose -f $(compose) rm -f + $(DOCKER_COMPOSE) -f $(compose) rm -f # help: shell - open a shell from containers .PHONY: shell shell: up - @docker-compose -f $(compose) exec opac_webapp sh + $(DOCKER_COMPOSE) -f $(compose) exec opac_webapp sh # help: docker_test - run the tests from containers .PHONY: docker_test docker_test: up - @docker-compose -f $(compose) exec opac_webapp make test + $(DOCKER_COMPOSE) -f $(compose) exec opac_webapp make test ################# ##docker release#