[fix]: env in docker config

This commit is contained in:
VivianDee
2025-03-31 12:16:27 +01:00
parent 3160bc30b7
commit 86a4b4f9b4
4 changed files with 12 additions and 14 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ class EligibilityCheckService(BaseService):
} }
return response_data return response_data
except ValidationError as err: except (ValidationError, ValueError) as err:
logger.error(f"Validation Error: {err.messages}") logger.error(f"Validation Error: {err.messages}")
return jsonify({ return jsonify({
"message": "Validation exception" "message": "Validation exception"
+3
View File
@@ -17,6 +17,9 @@ class Transaction(db.Model):
@classmethod @classmethod
def create_transaction(cls, id, account_id, customer_id, type, channel, msisdn, country_code,): def create_transaction(cls, id, account_id, customer_id, type, channel, msisdn, country_code,):
if cls.query.filter_by(id=id).first():
raise ValueError("Transaction with this id already exists")
transaction = cls( transaction = cls(
id=id, id=id,
customer_id=customer_id, customer_id=customer_id,
+2
View File
@@ -1,6 +1,8 @@
services: services:
digifi-bank-to-product-core: digifi-bank-to-product-core:
build: . build: .
env_file:
- .env
ports: ports:
- "${APP_PORT:-4500}:5000" - "${APP_PORT:-4500}:5000"
environment: environment:
+6 -13
View File
@@ -1,6 +1,12 @@
# Flask and Extensions # Flask and Extensions
Flask==2.3.3 Flask==2.3.3
# Database
flask-sqlalchemy
flask-migrate
psycopg2-binary
alembic
# Schema for validations # Schema for validations
Flask-Marshmallow==0.15.0 Flask-Marshmallow==0.15.0
marshmallow==3.19.0 marshmallow==3.19.0
@@ -14,19 +20,6 @@ gunicorn
# Swagger # Swagger
flask-swagger-ui flask-swagger-ui
# Database
flask-sqlalchemy
flask-migrate
psycopg2-binary
alembic
# Env # Env
python-dotenv python-dotenv
# Logging (Python Standard Library, for reference)