Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
build: devstack ecommerce reaches coordinator on host.docker.internal
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pshiu committed Apr 24, 2023
1 parent 9aaa07e commit 947c4ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ecommerce/settings/devstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down

0 comments on commit 947c4ed

Please sign in to comment.