From ee473aca8f757a58b9caff35334ae28fa126a1f7 Mon Sep 17 00:00:00 2001 From: jigoong Date: Wed, 27 May 2026 01:28:57 +0700 Subject: [PATCH] fix: finance upload filepath bug and add extra_hosts for keycloak auth flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fix NameError: filepath undefined in trigger_airflow call (use filepath_stored) - add extra_hosts ai.sriphat.com:192.168.100.8 for container DNS resolution (required for KEYCLOAK_SERVER_URL=http://ai.sriphat.com/keycloak/ to work inside Docker — host nginx on .8:80 routes /keycloak/ to Keycloak container) --- 03-apiservice/app/routes/pages.py | 2 +- 03-apiservice/docker-compose.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/03-apiservice/app/routes/pages.py b/03-apiservice/app/routes/pages.py index 4459313..c6810c2 100644 --- a/03-apiservice/app/routes/pages.py +++ b/03-apiservice/app/routes/pages.py @@ -175,7 +175,7 @@ async def upload_finance_file( result = await airflow_client.trigger_finance_dag( upload_id=upload_id, - filepath=str(filepath), + filepath=str(filepath_stored), filename=file.filename, uploaded_by=username, description=description diff --git a/03-apiservice/docker-compose.yml b/03-apiservice/docker-compose.yml index 3e8bace..3f86315 100644 --- a/03-apiservice/docker-compose.yml +++ b/03-apiservice/docker-compose.yml @@ -1,6 +1,7 @@ x-common-configs: &common-config extra_hosts: - "dev.sriphat.com:192.168.100.9" + - "ai.sriphat.com:192.168.100.8" pull_policy: ${DOCKER_PULL_POLICY:-missing} services: