Skip to content

Commit 7377c46

Browse files
Configured Microsoft Package Feed Proxy
1 parent 1c4dd45 commit 7377c46

28 files changed

Lines changed: 1379 additions & 1279 deletions

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/python:3.11-bullseye
1+
FROM mcr.microsoft.com/devcontainers/python:3.11-bookworm
22

33
# Remove Yarn repository to avoid GPG key expiration issue
44
RUN rm -f /etc/apt/sources.list.d/yarn.list
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"features": {
3+
"ghcr.io/azure/azure-dev/azd:latest": {
4+
"version": "0.2.0",
5+
"resolved": "ghcr.io/azure/azure-dev/azd@sha256:01bbec064fcb34f7c8730b3e3c2cc210699e213419664524982268b2910c4f73",
6+
"integrity": "sha256:01bbec064fcb34f7c8730b3e3c2cc210699e213419664524982268b2910c4f73"
7+
},
8+
"ghcr.io/devcontainers/features/azure-cli:1": {
9+
"version": "1.3.0",
10+
"resolved": "ghcr.io/devcontainers/features/azure-cli@sha256:d98f1066c077be0fa9d115b718f458bd803e415181b4a96f82a6f5d9f77241ac",
11+
"integrity": "sha256:d98f1066c077be0fa9d115b718f458bd803e415181b4a96f82a6f5d9f77241ac"
12+
},
13+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
14+
"version": "2.17.0",
15+
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:25b9f05705ffba7dbe503230ac76081419306f8c8bc88e0ce78c4ecd99a0c78c",
16+
"integrity": "sha256:25b9f05705ffba7dbe503230ac76081419306f8c8bc88e0ce78c4ecd99a0c78c"
17+
},
18+
"ghcr.io/devcontainers/features/node:1": {
19+
"version": "1.7.1",
20+
"resolved": "ghcr.io/devcontainers/features/node@sha256:8c0de46939b61958041700ee89e3493f3b2e4131a06dc46b4d9423427d06e5f6",
21+
"integrity": "sha256:8c0de46939b61958041700ee89e3493f3b2e4131a06dc46b4d9423427d06e5f6"
22+
},
23+
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {
24+
"version": "1.0.0",
25+
"resolved": "ghcr.io/jsburckhardt/devcontainer-features/uv@sha256:542a0bc2203205b3c696de650ba862f280b20af3543493cc232edd9ac35791f7",
26+
"integrity": "sha256:542a0bc2203205b3c696de650ba862f280b20af3543493cc232edd9ac35791f7"
27+
}
28+
}
29+
}

.devcontainer/devcontainer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"features": {
77
"ghcr.io/devcontainers/features/docker-in-docker:2": {"version": "latest"},
88
"ghcr.io/azure/azure-dev/azd:latest": {},
9-
"ghcr.io/devcontainers/features/node:1": {},
9+
"ghcr.io/devcontainers/features/node:1": {"pnpmVersion": "none"},
1010
"ghcr.io/devcontainers/features/azure-cli:1": {
1111
"installBicep": true,
1212
"version": "latest",
@@ -46,7 +46,10 @@
4646
"DISPLAY": "dummy",
4747
"PYTHONUNBUFFERED": "True",
4848
"UV_LINK_MODE": "copy",
49-
"UV_PROJECT_ENVIRONMENT": "/home/vscode/.venv"
49+
"UV_PROJECT_ENVIRONMENT": "/home/vscode/.venv",
50+
"PIP_INDEX_URL": "https://packagefeedproxy.microsoft.io/pypi/simple/",
51+
"UV_INDEX_URL": "https://packagefeedproxy.microsoft.io/pypi/simple/",
52+
"NPM_CONFIG_REGISTRY": "https://packagefeedproxy.microsoft.io/npm/"
5053
},
5154
"remoteUser": "vscode",
5255
"hostRequirements": {

.devcontainer/setupEnv.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ set -e
88

99
echo "Setting up Backend..."
1010
cd ./src/backend
11-
uv sync --frozen --extra dev
11+
uv sync --frozen
1212
cd ../../
1313

1414
echo "Setting up Frontend..."
1515
cd ./src/App
16+
npm_install_start=$(date +%s)
1617
npm install
18+
npm_install_end=$(date +%s)
19+
echo "npm install duration: $((npm_install_end-npm_install_start))s"
1720
pip install -r requirements.txt
1821
cd ../../
1922

.github/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
--index-url https://packagefeedproxy.microsoft.io/pypi/simple/
12
fastapi==0.136.1
23
uvicorn==0.35.0
34
azure-cosmos==4.15.0

.github/workflows/pylint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626

2727
- name: Install dependencies
2828
run: |
29-
python -m pip install --upgrade pip
29+
python -m pip install --upgrade pip --index-url https://packagefeedproxy.microsoft.io/pypi/simple/
3030
pip install -r .github/requirements.txt
31-
pip install flake8 # Ensure flake8 is installed explicitly
31+
pip install --index-url https://packagefeedproxy.microsoft.io/pypi/simple/ flake8 # Ensure flake8 is installed explicitly
3232
3333
- name: Run flake8 and pylint
3434
run: |

.github/workflows/test-automation-v2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Install dependencies
6161
run: |
62-
python -m pip install --upgrade pip
62+
python -m pip install --upgrade pip --index-url https://packagefeedproxy.microsoft.io/pypi/simple/
6363
pip install -r tests/e2e-test/requirements.txt
6464
6565
- name: Ensure browsers are installed

.github/workflows/test-automation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363

6464
- name: Install dependencies
6565
run: |
66-
python -m pip install --upgrade pip
66+
python -m pip install --upgrade pip --index-url https://packagefeedproxy.microsoft.io/pypi/simple/
6767
pip install -r tests/e2e-test/requirements.txt
6868
6969
- name: Ensure browsers are installed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
- name: Install dependencies
5757
run: |
58-
python -m pip install --upgrade pip
58+
python -m pip install --upgrade pip --index-url https://packagefeedproxy.microsoft.io/pypi/simple/
5959
pip install -r .github/requirements.txt
6060
6161
- name: Check if test files exist

docs/LocalDevelopmentSetup.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ This project uses Backend `.env` file in Backend directory with different config
6363
<!-- - **Frontend**: `src/App.env`
6464
- **MCP Server**: `src/mcp_sevrer/.env` -->
6565

66+
### Package Feed Proxy (Microsoft-managed devices)
67+
68+
On Microsoft-managed devices, direct access to public package registries (`npmjs.org`, `pypi.org`, `files.pythonhosted.org`) may be blocked. All `npm`, `pip`, and `uv` installs in this repository are pre-configured to route through the Central Feed Services (CFS)–protected Microsoft Package Feed Proxy:
69+
70+
- npm: `https://packagefeedproxy.microsoft.io/npm/` (configured in `src/App/.npmrc`)
71+
- pip: `https://packagefeedproxy.microsoft.io/pypi/simple/` (configured as the first line of each `requirements.txt`)
72+
- uv: `https://packagefeedproxy.microsoft.io/pypi/simple/` (configured in each project's `pyproject.toml` under `[tool.uv]`)
73+
74+
No additional setup should be required on a Microsoft-managed device. If you need to point at a different index temporarily, override it with the `PIP_INDEX_URL` / `UV_INDEX_URL` environment variables or the npm `--registry` flag.
75+
6676

6777
## Step 1: Prerequisites - Install Required Tools
6878

0 commit comments

Comments
 (0)