Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This change is mainly to reduce the size and startup time of the store-front and store-admin container images. The images were too large (>400MB) and could underperform in scale-out scenarios. Both store-front and store-admin were built with Vue.js and included a devserver which was used to proxy requests to other microservices.
To reduce the size of the containers, the Dockerfiles were updated to do a "production" build of the containers and run the JS files in a NGINX web server rather than running a server using the
npm run serve
command.With NGINX now running as the proxy, an app architecture decision was made to move the ai-service behind the product-service and have the product-service serve as the proxy for ai-service. This was due to a limitation of the NGINX server's ability to conditionally proxy web requests to services that may or may not exist.
The store-front and store-admin container image sizes are now ~45MB (about 89% reduction)
Additional changes in this PR include Azure Developer CLI and Helm chart enhancements to allow for more configurable deployments (i.e., Azure CosmosDB API choice of MongoDB vs SQL API, and Azure Container Registry for application deployments).
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
Local dev with Docker Compose
Local dev with Docker Compose quickstart
Azure with Azure Developer CLI (azd)
Azure with azd and Azure Container Registry (import containers from ghcr.io)
Azure with azd and Azure Container Registry (build containers from source)
Azure with azd and Azure CosmosDB SQL API
What to Check
Verify that the following are valid
Other Information