From 947c4eda7a4f0bfed9efc81de88418d2b845e5e3 Mon Sep 17 00:00:00 2001 From: Phillip Shiu Date: Sun, 23 Apr 2023 17:50:43 -0400 Subject: [PATCH] build: devstack ecommerce reaches coordinator on host.docker.internal settings/base.py currently points COMMERCE_COORDINATOR_SERVICE_URL to localhost. But commerce-coordinator isn't in devstack yet. Because localhost is the local Docker network (and not the host machine) within a Docker container, ecommerce in devstack won't be able to reach commerce-coordinator. host.docker.internal is an internal Docker alias for the host machine running Docker Desktop. (localhost from within a Docker container is the container itself, not the machine running Docker Desktop.) Use host.docker.internal instead of localhost to connect to Coordinator. --- ecommerce/settings/devstack.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ecommerce/settings/devstack.py b/ecommerce/settings/devstack.py index 919b29cffd8..1f953a7dc80 100644 --- a/ecommerce/settings/devstack.py +++ b/ecommerce/settings/devstack.py @@ -66,6 +66,8 @@ ENTERPRISE_ANALYTICS_API_URL = 'http://edx.devstack.analyticsapi:19001' +COMMERCE_COORDINATOR_SERVICE_URL = 'http://host.docker.internal:8140' + # PAYMENT PROCESSING PAYMENT_PROCESSOR_CONFIG = { 'edx': {