Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GITHUB_MCP_URL=https://your-mcp-server

#### c. Run the backend
```bash
uvicorn main:app --reload --host 0.0.0.0 --port 8080
uvicorn api.main:app --reload --host 0.0.0.0 --port 8080
```

### 2. Frontend (UI)
Expand Down
2 changes: 1 addition & 1 deletion UI/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e

mkdir -p /opt/app-root/src/config

cat <<EOF > /opt/app-root/src/config/config.js
Copy link
Member

Choose a reason for hiding this comment

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

that's a clear bug, I don't know how it is working now :)

The point of adding this config file was to make the backend API URL configurable. The react app generates pages and settings during build time and so it was not straightforward to have a runtime environment variable for the backend API. I'm open to suggestions / alternatives to this approach, my understanding here is limited.

We'd have to test any changes by rebuilding the image and testing the deployment on OpenShift. We need Github Actions.

Copy link
Author

Choose a reason for hiding this comment

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

so the bug I got was basically config.js file not found and since the actual file name is config.ts once I updated it, it worked...not sure how it worked on OpenShift if the filename itself doesn't exist?

Copy link
Member

Choose a reason for hiding this comment

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

makes sense!

cat <<EOF > /opt/app-root/src/config/config.ts
window.APP_CONFIG = {
API_BASE_URL: "${API_BASE_URL}"
};
Expand Down
2 changes: 1 addition & 1 deletion UI/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body>
<div id="root"></div>
<script src="/config/config.js"></script>
<script src="/config/config.ts"></script>
<script type="module" src="/main.tsx"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions backend/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ FROM python:3.11-slim

WORKDIR /app

COPY backend/requirements.txt /app/requirements.txt
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt

COPY backend /app/backend
COPY . /app/backend

# (Entrypoint or CMD should be set in deployment, not here)
2 changes: 1 addition & 1 deletion backend/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from autogen_agentchat.base import TaskResult

# Import predefined models and manager
from backend.core.agents import AgentManager, IssueRequest, IssueResponse
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this give an error on the Openshift pod, since it would run from the root of the repository?

For a local run, would running the server from root of the repository instead of the backend directory solve this issue?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah if we update the instructions in the README to run from root instead of backend dir then we don't need to do this

Copy link
Member

Choose a reason for hiding this comment

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

It looks good overall, If we revert this change and update the README, I'll go ahead and merge this in.
Thanks for the fixes!

from core.agents import AgentManager, IssueRequest, IssueResponse

# Setup logging
logger = logging.getLogger(__name__)
Expand Down