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

Grpc web proxy client example #553

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ShahanaFarooqui
Copy link
Collaborator

No description provided.

cdecker and others added 6 commits December 17, 2024 16:05
We want to ensure that we can run both inside and outside the docker
container, thus we better make sure that the repo inside and outside
of the docker container use the same paths and permissions.
We were mapping the ports and the source into the docker image, but we
were not mapping the certs out into the host. Without this the host
could not connect as it had no valid certificates to check against.
When mounting in the repository, along with its target directory, we
might have some issue if the host arch does not match the guest
arch. We'd either use the host binary on the guest arch, or we end up
compiling the guest into the host target dir, meaning the host won't
work anymore.

By moving the target dir into a separate directory we then don't touch
the hosts' binaries.
@ShahanaFarooqui ShahanaFarooqui force-pushed the grpc-web-proxy-client-example branch from a40fb4d to df04fc8 Compare December 19, 2024 06:31
Copy link
Collaborator

@cdecker cdecker left a comment

Choose a reason for hiding this comment

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

Sorry for the slow response @ShahanaFarooqui, it seems I forgot to actually submit my comments 😅

@@ -208,5 +210,5 @@ gltestserver: gltestserver-image
-e DOCKER_USER=$(shell whoami) \
--net=host \
-ti \
-v $(shell pwd)/.testserver:/tmp/gltestserver \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Notice that with this you cannot run the test server outside of the test servers code itself, as it mounts its own code into the container as a volume. The goal here was to create a small shared island inside and outside, but otherwise leave the host directly untouched. This allows for users to use the test server for example from inside their projects repository, allowing them to test against GL.


# Force this target dir, so the scripts can find all the binaries.
#ENV CARGO_TARGET_DIR=${REPO}/target
ENV CARGO_TARGET_DIR=/tmp/target/
Copy link
Collaborator

Choose a reason for hiding this comment

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

This no longer deposita the artifacts in the shared island, and thus the host cannot access them after the container built them.

RUN uv run clnvm get-all
CMD uv run gltestserver run --metadata /tmp/gltestserver
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch, I must've missed this one, as it also doesn't point to the shared island 👍

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