Skip to content

Commit

Permalink
Merge pull request #182 from gitnnolabs/environment_review
Browse files Browse the repository at this point in the history
Revisão das variáveis de ambiente e outros ajustes.
  • Loading branch information
gitnnolabs authored Sep 18, 2024
2 parents f3d2858 + c04270c commit fd9615d
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 24 deletions.
15 changes: 11 additions & 4 deletions .envs/.production/.flask → .envs/.production-template/.flask
Original file line number Diff line number Diff line change
Expand Up @@ -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 -------------------
# ------------------------------------------------------------

Expand All @@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -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=
OPAC_USE_ALTMETRIC=True
OPAC_ALTMETRIC_METRICS_URL=https://www.altmetric.com/details.php
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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=
25 changes: 16 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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#
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd9615d

Please sign in to comment.