diff --git a/core_composer/.env.core b/core_composer/.env.core new file mode 100644 index 0000000..bb6e29d --- /dev/null +++ b/core_composer/.env.core @@ -0,0 +1,40 @@ + +# Environment Variables ====================================================== +BASIC_AUTH_USERNAME=user +BASIC_AUTH_PASSWORD=password +SWAGGER_URL="/documentation" +API_URL="/swagger.json" + +# Flask Configuration ========================================================= +FLASK_APP=wsgi.py +FLASK_ENV=development +APP_PORT=4500 + +#Database Configuration ======================================================= +DATABASE_USER=FIRSTADVSTG +DATABASE_PASSWORD=Pchanged_56789 +DATABASE_HOST=ig-x6-uat-scan +DATABASE_PORT=1521 +DATABASE_NAME=FIRSTADVSTG +DATABASE_SID=firstadv +SQLALCHEMY_DATABASE_URI_FULL="oracle+oracledb://FIRSTADVSTG:Pchanged_56789@10.2.110.30:1521/?service_name=firstadv" + +# Event Bus ===================================================================== +KAFKA_BROKER="10.2.110.20:9082" + +#Bank Calls ===================================================================== +SIMBRELLA_BASE_URL="https://bank-emulator.dev.simbrellang.net" +SIMBRELLA_APP_ID="app1" +SIMBRELLA_API_KEY="testtest-api-key-12345" + +#Events Direct Location ========================================================= +EVENTS_SERVICE_BASE_URL="http://10.2.24.133:5000" +ENDPOINT_DIRECT_LOAN="/autocall/direct/loan" +ENDPOINT_DIRECT_REPAYMENT="/autocall/direct/repayment" + +#EVENTS_SERVICE_BASE_URL2="https://event-core.simbrellang.net" +#EVENTS_SERVICE_BASE_URL="http://10.10.11.17:14700" + + + + diff --git a/core_composer/docker-compose.yml b/core_composer/docker-compose.yml new file mode 100644 index 0000000..282a40c --- /dev/null +++ b/core_composer/docker-compose.yml @@ -0,0 +1,18 @@ +services: + digifi-core: + image: "registry.simbrellang.net/digifi/banktoproductcore:latest" + build: + dockerfile: core/Dockerfile + env_file: + - .env.core + ports: + - "4500" + environment: + - FLASK_APP=wsgi.py + - FLASK_ENV=development + #- DATABASE_URL=postgresql+psycopg2://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME} + volumes: + - .:/app + restart: always + + diff --git a/core_composer/entrypoint2.sh b/core_composer/entrypoint2.sh new file mode 100644 index 0000000..8c7018a --- /dev/null +++ b/core_composer/entrypoint2.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +echo "Running DB migrations..." +flask db upgrade + +echo "Starting Gunicorn server..." +exec gunicorn -w 4 -b 0.0.0.0:5000 wsgi:wsgi_app diff --git a/core_composer/scripts/entrypoint.sh b/core_composer/scripts/entrypoint.sh new file mode 100644 index 0000000..9a12075 --- /dev/null +++ b/core_composer/scripts/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# echo "Running DB migrations..." +# flask db migrate -m "Migration on $(date)" +# flask db upgrade + +echo "Starting Gunicorn server..." +exec gunicorn -w 4 -b 0.0.0.0:5000 wsgi:wsgi_app diff --git a/core_composer/wsgi.py b/core_composer/wsgi.py new file mode 100644 index 0000000..49f70e1 --- /dev/null +++ b/core_composer/wsgi.py @@ -0,0 +1,7 @@ +from app import create_app + +app = create_app() + +if __name__ != "__main__": + # Expose WSGI app instance for Gunicorn + wsgi_app = app diff --git a/product/scripts/entrypoint.sh b/product/scripts/entrypoint.sh new file mode 100644 index 0000000..9a12075 --- /dev/null +++ b/product/scripts/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# echo "Running DB migrations..." +# flask db migrate -m "Migration on $(date)" +# flask db upgrade + +echo "Starting Gunicorn server..." +exec gunicorn -w 4 -b 0.0.0.0:5000 wsgi:wsgi_app