Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dynamic route mapping for discounts and ads #217

Merged
merged 11 commits into from
Apr 7, 2022

Conversation

stanleegoodspeed
Copy link
Collaborator

@stanleegoodspeed stanleegoodspeed commented Apr 6, 2022

#13

This allows frontend to connect to the ads and discounts on a configurable path set at runtime via the deploy/docker-compose/.env file:

The values default to the docker routes http://advertisements and http://discounts

ADS_ROUTE="http://advertisements"
DISCOUNTS_ROUTE="http://discounts"

I've also updated the developer documentation to accurately reflect how to make a core change across all frontend versions.

How to test

  1. Pull down this branch locally, rebuild frontend code , change the ports in deploy/docker-compose/.env, and start the app via the baseline compose file e.g.

POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres DD_API_KEY=[API KEY] make local-baseline-start

  1. Visit http://localhost and verify that the homepage loads both discounts and ads

image: "ddtraining/storefront-fixed:latest"
- ADS_ROUTE=${ADS_ROUTE}
- DISCOUNTS_ROUTE=${DISCOUNTS_ROUTE}
image: "public.ecr.aws/x2b9z2t7/ddtraining/storefront-fixed:latest"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be tagged with the associated release, rather than latest?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This compose file is used for local development only, so I keep it tagged to latest so the most recent changes to storefront are always being tested if we're between releases

@stanleegoodspeed stanleegoodspeed merged commit 8a58698 into main Apr 7, 2022
@stanleegoodspeed stanleegoodspeed deleted the ccole/dynamic-route branch April 7, 2022 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants