From 601f96309bdd76e11faf6508874e2c220ccca8d8 Mon Sep 17 00:00:00 2001 From: "Chang, Hui-Tang" Date: Tue, 12 Mar 2024 03:35:21 -0500 Subject: [PATCH] fix(docker-compose): add `INSTILL_CORE_HOST` back for Console to connect to the backend properly (#441) Because - We cannot use the Docker internal address for the Console to connect to the backend. This commit - Adds `INSTILL_CORE_HOST` back. --- .env | 4 ++++ .github/workflows/integration-test-console.yml | 4 ++-- docker-compose.yml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 05bb8c83..c3047023 100644 --- a/.env +++ b/.env @@ -31,6 +31,10 @@ INITMODEL_ENABLED=false # configuration directory path CONFIG_DIR_PATH=./configs +# Instill Core instance host +# Please set the IP address of your host machine. +INSTILL_CORE_HOST=localhost + # container build DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 diff --git a/.github/workflows/integration-test-console.yml b/.github/workflows/integration-test-console.yml index 1c381eb3..582e9d52 100644 --- a/.github/workflows/integration-test-console.yml +++ b/.github/workflows/integration-test-console.yml @@ -44,7 +44,7 @@ jobs: - name: Launch Instill Core (latest) run: | - make latest BUILD=true EDITION=local-ce:test ITMODE_ENABLED=true + make latest BUILD=true EDITION=local-ce:test ITMODE_ENABLED=true INSTILL_CORE_HOST=api-gateway - name: Run console integration test (latest) run: | @@ -122,7 +122,7 @@ jobs: - name: Launch Instill Core (release) run: | - make all BUILD=true EDITION=local-ce:test ITMODE_ENABLED=true + make all BUILD=true EDITION=local-ce:test ITMODE_ENABLED=true INSTILL_CORE_HOST=api-gateway - name: Run console integration test (release) run: | diff --git a/docker-compose.yml b/docker-compose.yml index 05503c5a..f09693a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -358,7 +358,7 @@ services: NEXT_PUBLIC_USAGE_COLLECTION_ENABLED: ${USAGE_ENABLED} NEXT_PUBLIC_CONSOLE_EDITION: ${EDITION} NEXT_PUBLIC_CONSOLE_BASE_URL: http://${CONSOLE_HOST}:${CONSOLE_PORT} - NEXT_PUBLIC_API_GATEWAY_URL: http://${API_GATEWAY_HOST}:${API_GATEWAY_PORT} + NEXT_PUBLIC_API_GATEWAY_URL: http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} NEXT_SERVER_API_GATEWAY_URL: http://${API_GATEWAY_HOST}:${API_GATEWAY_PORT} NEXT_PUBLIC_INSTILL_AI_USER_COOKIE_NAME: instill-ai-user NEXT_PUBLIC_SELF_SIGNED_CERTIFICATION: "false"