-
Notifications
You must be signed in to change notification settings - Fork 36
Multi-container setup for agent -> MCP server networking #11
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2234cb6
Add second container for agent
pamelafox a5902fe
Add health checks
pamelafox 8f0ce4f
Use remoteBuild
pamelafox 58afb4c
Merge branch 'main' into secondcontainer
pamelafox 7467d92
Address feedback from Copilot
pamelafox 85a17c1
Adding README
pamelafox f3a11c0
Address feedback
pamelafox d4a8c62
Address feedback
pamelafox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| .azure | ||
| .venv | ||
| .logfire | ||
| .devcontainer | ||
| infra | ||
|
|
||
| # Common Python and development files to exclude | ||
| __pycache__ | ||
| *.pyc | ||
| *.pyo | ||
| *.egg-info | ||
| .pytest_cache | ||
| .ruff_cache | ||
| .env | ||
| .git | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # ------------------- Stage 1: Build Stage ------------------------------ | ||
| # We use Alpine for smaller image size (~329MB vs ~431MB for Debian slim). | ||
| # Trade-off: We must install build tools to compile native extensions (cryptography, etc.) | ||
| # since pre-built musl wheels aren't available. Debian -slim would skip compilation | ||
| # but produces a larger final image due to glibc wheel sizes. | ||
| FROM python:3.13-alpine AS build | ||
|
|
||
| # Install build dependencies for packages with native extensions (cryptography, etc.) | ||
| # https://cryptography.io/en/latest/installation/#building-cryptography-on-linux | ||
| RUN apk add --no-cache gcc g++ musl-dev python3-dev libffi-dev openssl-dev cargo pkgconfig | ||
|
|
||
| COPY --from=ghcr.io/astral-sh/uv:0.9.14 /uv /uvx /bin/ | ||
|
|
||
| WORKDIR /code | ||
|
|
||
| # Copy dependency files and install dependencies (for layer caching) | ||
| # Note: We can't use --mount=type=cache since Azure Container Apps remote build doesn't support BuildKit: | ||
| # https://github.com/Azure/acr/issues/721 | ||
| COPY uv.lock pyproject.toml ./ | ||
| RUN uv sync --locked --no-install-project | ||
|
|
||
| # Copy the project and sync | ||
| COPY . . | ||
| RUN uv sync --locked | ||
|
|
||
| # ------------------- Stage 2: Final Stage ------------------------------ | ||
| FROM python:3.13-alpine AS final | ||
|
|
||
| RUN addgroup -S app && adduser -S app -G app | ||
|
|
||
| COPY --from=build --chown=app:app /code /code | ||
|
|
||
| WORKDIR /code/agents | ||
| USER app | ||
|
|
||
| ENV PATH="/code/.venv/bin:$PATH" | ||
|
|
||
| ENTRYPOINT ["python", "agentframework_http.py"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.