fix: finance upload filepath bug and add extra_hosts for keycloak auth flow

- 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)
This commit is contained in:
jigoong
2026-05-27 01:28:57 +07:00
parent a587be08bd
commit ee473aca8f
2 changed files with 2 additions and 1 deletions

View File

@@ -175,7 +175,7 @@ async def upload_finance_file(
result = await airflow_client.trigger_finance_dag( result = await airflow_client.trigger_finance_dag(
upload_id=upload_id, upload_id=upload_id,
filepath=str(filepath), filepath=str(filepath_stored),
filename=file.filename, filename=file.filename,
uploaded_by=username, uploaded_by=username,
description=description description=description

View File

@@ -1,6 +1,7 @@
x-common-configs: &common-config x-common-configs: &common-config
extra_hosts: extra_hosts:
- "dev.sriphat.com:192.168.100.9" - "dev.sriphat.com:192.168.100.9"
- "ai.sriphat.com:192.168.100.8"
pull_policy: ${DOCKER_PULL_POLICY:-missing} pull_policy: ${DOCKER_PULL_POLICY:-missing}
services: services: