Option to rewrite endpoint URL - Fix local instance #2150
+28
−0
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.
Suggested reviewer: @ihsaan-ullah
Description
Add an option environment variable:
It is used inside
compute_worker.pyto rewrite the endpoint URL.This solves cases of
connection refusedbecause backend signs URLs are different between the host and inside the docker container.Typical case on macOS: backend signs URLs with host
docker.for.mac.localhost:9000, inside the container we needminio:9000Issues this PR resolves
Manual installation instructions
Add the
WORKER_BUNDLE_URL_REWRITEvariable in the.envfile. For instance for local macOS setup:Keep it commented when it is not useful (like it is in
.env_sample)Rebuild the compute worker to take the changes into account:
A checklist for hand testing
Checklist