From 6a6792634e74a93358e6a38cf9b55d1df27ff2e4 Mon Sep 17 00:00:00 2001 From: ariwahyunahar Date: Mon, 11 Aug 2025 14:49:00 +0700 Subject: [PATCH] docker file --- app.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index 8e2d9d6..e31f41c 100644 --- a/app.py +++ b/app.py @@ -14,13 +14,13 @@ load_dotenv() app = Flask(__name__) -# Database configuration -DB_HOST_1 = "192.168.1.85" # For tables: pf_parts, ms_equipment_master -DB_HOST_2 = "192.168.1.86" # For table: dl_pi_fetch_last -DB_PORT = "5432" -DB_USER = "postgres" -DB_PASS = "postgres" -DB_NAME = "digital_twin" +# Database configuration from environment variables +DB_HOST_1 = os.getenv("DB_HOST_1") # For tables: pf_parts, ms_equipment_master +DB_HOST_2 = os.getenv("DB_HOST_2") # For table: dl_pi_fetch_last +DB_PORT = os.getenv("DB_PORT") +DB_USER = os.getenv("DB_USER") +DB_PASS = os.getenv("DB_PASS") +DB_NAME = os.getenv("DB_NAME") def chunked_iterable(iterable, size): """Helper to split list into chunks"""