Skip to content

Commit

Permalink
18521 Add config for entity-dc queue listener (bcgov#2322)
Browse files Browse the repository at this point in the history
  • Loading branch information
argush3 authored Nov 21, 2023
1 parent 4f43d91 commit 19d978d
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 5 deletions.
37 changes: 37 additions & 0 deletions queue_services/entity-digital-credentials/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# platform=linux/amd64
FROM python:3.8.6-buster

ARG VCS_REF="missing"
ARG BUILD_DATE="missing"

ENV VCS_REF=${VCS_REF}
ENV BUILD_DATE=${BUILD_DATE}

LABEL org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.build-date=${BUILD_DATE}

USER root

# Create working directory
RUN mkdir /opt/app-root && chmod 755 /opt/app-root
WORKDIR /opt/app-root

# Install the requirements
COPY ./requirements.txt .

#RUN pip install --upgrade pip
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

RUN pip install .

USER 1001

# Set Python path
ENV PYTHONPATH=/opt/app-root/src

EXPOSE 8080

CMD [ "python", "/opt/app-root/digital_credentials_service.py" ]
4 changes: 2 additions & 2 deletions queue_services/entity-digital-credentials/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ clean-test: ## clean test files
build-req: clean ## Upgrade requirements
test -f venv/bin/activate || python3.8 -m venv $(CURRENT_ABS_DIR)/venv ;\
. venv/bin/activate ;\
pip install pip==20.1.1 ;\
pip install upgrade pip ;\
pip install -Ur requirements/prod.txt ;\
pip freeze | sort > requirements.txt ;\
cat requirements/bcregistry-libraries.txt >> requirements.txt ;\
Expand All @@ -48,7 +48,7 @@ build-req: clean ## Upgrade requirements
install: clean ## Install python virtrual environment
test -f venv/bin/activate || python3.8 -m venv $(CURRENT_ABS_DIR)/venv ;\
. venv/bin/activate ;\
pip install pip==20.1.1 ;\
pip install upgrade pip ;\
pip install -Ur requirements.txt

install-dev: ## Install application for local development
Expand Down
28 changes: 27 additions & 1 deletion queue_services/entity-digital-credentials/devops/vaults.json
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
[]
[
{
"vault": "entity",
"application": [
"launchdarkly"
]
},
{
"vault": "database",
"application": [
"entity-db"
]
},
{
"vault": "nats",
"application": [
"base",
"entity-digital-credentials"
]
},
{
"vault": "bbdc",
"application": [
"aca-py"
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ flake8-quotes
pep8-naming
autopep8
coverage
pylint<=2.3.1
pylint
pylint-flask
isort<5,>=4.2.5
pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion queue_services/entity-digital-credentials/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ good-names=

[pylint]
ignore=migrations,test
max_line_length=120
max-line-length=120
notes=FIXME,XXX,TODO
ignored-modules=flask_sqlalchemy,sqlalchemy,SQLAlchemy,alembic,scoped_session
ignored-classes=scoped_session
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class _Config(): # pylint: disable=too-few-public-methods
Used as the base for all the other configurations.
"""

PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))

SENTRY_DSN = os.getenv('SENTRY_DSN', None)
LD_SDK_KEY = os.getenv('LD_SDK_KEY', None)

# variables
Expand Down

0 comments on commit 19d978d

Please sign in to comment.