Files
meezi/nuget.mirror.config
T
soroush.asadi 6f85cfe4d3 feat(infra): add local pull-through mirrors for NuGet, npm, Docker Hub
docker-compose.mirror.yml:
  - BaGet  (port 5101) → proxies nuget.org
  - Verdaccio (port 4873) → proxies npmjs.com
  - registry:2 (port 5100) → proxies Docker Hub

nuget.mirror.config: points dotnet restore at http://mirror:5101
mirrors/verdaccio/config.yaml: open reads, upstream npmjs fallback

CI workflow:
  - All container jobs: --add-host=mirror:host-gateway
  - dotnet restore --configfile nuget.mirror.config
  - npm install --registry http://mirror:4873

First run: packages fetched from upstream through the VPS.
All subsequent runs: served from local disk, no CDN needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 14:31:12 +03:30

16 lines
635 B
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- NuGet config for CI: routes all restores through the local BaGet mirror.
Usage: dotnet restore --configfile nuget.mirror.config
BaGet fetches from nuget.org on first request, then caches locally.
DO NOT use this file for local development (mirror must be running). -->
<configuration>
<packageSources>
<clear />
<add key="local-mirror" value="http://mirror:5101/v3/index.json" protocolVersion="3" />
</packageSources>
<config>
<add key="http_retry_count" value="8" />
<add key="http_retry_delay_milliseconds" value="1000" />
</config>
</configuration>