Route all package mirrors through local Nexus

Point Docker, NuGet, and npm pulls at the Nexus group repos on
171.22.25.73:8081 for both CI/CD and local builds, so the pipeline and
developers no longer depend on Docker Hub, MCR, nuget.org, or npmjs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-05-30 00:28:07 +03:30
parent 62bd7a12f5
commit e8cd6d3282
11 changed files with 70 additions and 61 deletions
+26 -28
View File
@@ -17,13 +17,13 @@ concurrency:
# ubuntu-latest:docker://node:20-alpine ← CI jobs run in real Docker containers
# self-hosted:host ← deploy runs directly on the server
#
# All images are pulled from local Nexus mirrors (fast, no internet):
# Docker Hub → http://171.22.25.73:5000 (docker-hub-proxy repo)
# MCR → http://171.22.25.73:5002 (mcr-proxy repo)
# All images/packages served from local Nexus at 171.22.25.73:8081:
# Docker images → 171.22.25.73:8081 (docker-group: Docker Hub + MCR)
# NuGet → http://171.22.25.73:8081/repository/nuget-group/
# npm → http://171.22.25.73:8081/repository/npm-group/
#
# mirror hostname → host-gateway (docker bridge IP 172.17.0.1) — used for:
# NuGet → http://mirror:8081/repository/nuget-group/
# npm → http://mirror:8081/repository/npm-group/
# The runner host is 171.22.25.73, so Nexus is always reachable directly.
# Daemon must have: "insecure-registries": ["171.22.25.73:8081"]
# ─────────────────────────────────────────────────────────────────────────────
jobs:
@@ -32,13 +32,12 @@ jobs:
name: "CI · API (dotnet build + test)"
runs-on: ubuntu-latest
container:
image: 171.22.25.73:5002/dotnet/sdk:10.0
image: 171.22.25.73:8081/repository/docker-group/dotnet/sdk:10.0
options: >-
--add-host=gitea:host-gateway
--add-host=mirror:host-gateway
services:
postgres:
image: docker-mirror.liara.ir/library/postgres:16-alpine
image: 171.22.25.73:8081/repository/docker-group/postgres:16-alpine
env:
POSTGRES_DB: meezi_test
POSTGRES_USER: meezi
@@ -49,7 +48,7 @@ jobs:
--health-timeout 5s
--health-retries 10
redis:
image: docker-mirror.liara.ir/library/redis:7-alpine
image: 171.22.25.73:8081/repository/docker-group/redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
@@ -74,8 +73,10 @@ jobs:
<configuration>
<packageSources>
<clear />
<add key="nexus" value="http://mirror:8081/repository/nuget-group/index.json"
protocolVersion="3" allowInsecureConnections="true" />
<add key="nexus"
value="http://171.22.25.73:8081/repository/nuget-group/index.json"
protocolVersion="3"
allowInsecureConnections="true" />
</packageSources>
</configuration>
EOF
@@ -98,10 +99,9 @@ jobs:
name: "CI · Admin API (dotnet build)"
runs-on: ubuntu-latest
container:
image: 171.22.25.73:5002/dotnet/sdk:10.0
image: 171.22.25.73:8081/repository/docker-group/dotnet/sdk:10.0
options: >-
--add-host=gitea:host-gateway
--add-host=mirror:host-gateway
steps:
- name: Checkout
env:
@@ -121,8 +121,10 @@ jobs:
<configuration>
<packageSources>
<clear />
<add key="nexus" value="http://mirror:8081/repository/nuget-group/index.json"
protocolVersion="3" allowInsecureConnections="true" />
<add key="nexus"
value="http://171.22.25.73:8081/repository/nuget-group/index.json"
protocolVersion="3"
allowInsecureConnections="true" />
</packageSources>
</configuration>
EOF
@@ -139,10 +141,9 @@ jobs:
name: "CI · Dashboard (tsc)"
runs-on: ubuntu-latest
container:
image: 171.22.25.73:5000/library/node:20-alpine
image: 171.22.25.73:8081/repository/docker-group/node:20-alpine
options: >-
--add-host=gitea:host-gateway
--add-host=mirror:host-gateway
steps:
- name: Checkout
env:
@@ -158,7 +159,7 @@ jobs:
- name: Install dependencies
working-directory: web/dashboard
run: npm install --legacy-peer-deps --ignore-scripts --registry http://mirror:8081/repository/npm-group/
run: npm install --legacy-peer-deps --ignore-scripts --registry http://171.22.25.73:8081/repository/npm-group/
- name: TypeScript check
working-directory: web/dashboard
@@ -170,10 +171,9 @@ jobs:
name: "CI · Admin Web (tsc)"
runs-on: ubuntu-latest
container:
image: 171.22.25.73:5000/library/node:20-alpine
image: 171.22.25.73:8081/repository/docker-group/node:20-alpine
options: >-
--add-host=gitea:host-gateway
--add-host=mirror:host-gateway
steps:
- name: Checkout
env:
@@ -189,7 +189,7 @@ jobs:
- name: Install dependencies
working-directory: web/admin
run: npm install --legacy-peer-deps --ignore-scripts --registry http://mirror:8081/repository/npm-group/
run: npm install --legacy-peer-deps --ignore-scripts --registry http://171.22.25.73:8081/repository/npm-group/
- name: TypeScript check
working-directory: web/admin
@@ -201,10 +201,9 @@ jobs:
name: "CI · Website (tsc)"
runs-on: ubuntu-latest
container:
image: 171.22.25.73:5000/library/node:20-alpine
image: 171.22.25.73:8081/repository/docker-group/node:20-alpine
options: >-
--add-host=gitea:host-gateway
--add-host=mirror:host-gateway
steps:
- name: Checkout
env:
@@ -220,7 +219,7 @@ jobs:
- name: Install dependencies
working-directory: web/website
run: npm install --legacy-peer-deps --ignore-scripts --registry http://mirror:8081/repository/npm-group/
run: npm install --legacy-peer-deps --ignore-scripts --registry http://171.22.25.73:8081/repository/npm-group/
- name: TypeScript check
working-directory: web/website
@@ -232,10 +231,9 @@ jobs:
name: "CI · Koja (tsc)"
runs-on: ubuntu-latest
container:
image: 171.22.25.73:5000/library/node:20-alpine
image: 171.22.25.73:8081/repository/docker-group/node:20-alpine
options: >-
--add-host=gitea:host-gateway
--add-host=mirror:host-gateway
steps:
- name: Checkout
env:
@@ -251,7 +249,7 @@ jobs:
- name: Install dependencies
working-directory: web/koja
run: npm install --legacy-peer-deps --ignore-scripts --registry http://mirror:8081/repository/npm-group/
run: npm install --legacy-peer-deps --ignore-scripts --registry http://171.22.25.73:8081/repository/npm-group/
- name: TypeScript check
working-directory: web/koja