-
Notifications
You must be signed in to change notification settings - Fork 10
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
[BUILD] fix docker configuration for the Quickstart application #90
base: master
Are you sure you want to change the base?
[BUILD] fix docker configuration for the Quickstart application #90
Conversation
…cal php LRN-45518
…p server LRN-45518
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Makefile
Outdated
docker-targets = quickstart | ||
$(docker-targets): docker-build | ||
$(DOCKER_COMPOSE) run --rm php make -e MAKEFLAGS="$(MAKEFLAGS)" $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule conflicts with a later one, so it gets overridden, except for the dependency on docker-build
. Why not just make the later quickstart
target depend on docker-build
, if that is required? Either way, might as well remove this conditional section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the intention was to still run the old way, so you don't need to have PHP installed? But the dependency docker-build
runs composer locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still works for me, even though I don't have PHP installed, because I have a composer
that is a script that runs composer inside a container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed these targets as they were based on the old docker logic and trying to run a php container to do the build. This lead to two containers being created.
Makefile
Outdated
quickstart: | ||
ifneq (,$(DOCKER)) | ||
$(MAKE) docker-quickstart | ||
else | ||
$(MAKE) local-quickstart | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to run these in a vanilla sub-make? The only effect seems to be to make you have to export your environment variable settings. What about
quickstart: | |
ifneq (,$(DOCKER)) | |
$(MAKE) docker-quickstart | |
else | |
$(MAKE) local-quickstart | |
endif | |
quickstart: $(if $(DOCKER),docker-build) $(if $(DOCKER),docker,local)-quickstart |
Or create more variables if the if
syntax seems too much in situ.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makefile updated
Makefile
Outdated
export PHP_VERSION | ||
export DEBIAN_VERSION | ||
export COMPOSER_VERSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure why you need to export these explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed, orphaned from some attempt to make the original docker container work with binding to 0.0.0.0 and running php natively within the conttainer
Summary:
This PR addresses issues with the PHP SDK running within a Docker container for the Quickstart application, specifically related to domain whitelisting and API access. The following changes were made to resolve these issues:
Issues Addressed:
Proposed Solution:
To resolve the issues:
Additionally, customers can still run the Quickstart application locally without Docker. This can be tested by setting LRN_SDK_NO_DOCKER=false, allowing the PHP server to run independently of Docker.
Acceptance Criteria:
QA Testing:
Run make quickstart with Docker installed.
Run make quickstart without Docker (using a local PHP server).
Checklist
Feature
Bug
ChangeLog.md updated
Tests added
All testsuite passes
make dist
completed successfully