Files
meezi/docker-compose.mirror.yml
T
soroush.asadi 539165b6bb fix(ci): replace python3 with cat heredoc; sync local registry IPs
python3 is not in PATH inside dotnet/sdk:10.0 container — replace the
"Write NuGet config" step with a cat heredoc which works in any container.

Also syncs GitHub with the Gitea-side changes:
  - All images pulled from local Nexus mirrors (no internet round-trip)
      171.22.25.73:5000 → docker-hub-proxy (node, postgres, redis)
      171.22.25.73:5002 → mcr-proxy        (dotnet/sdk)
  - npm steps already on npm-group (Liara + Runflare fallback)
  - docker-compose.mirror.yml: expose port 5002 for mcr-proxy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 18:34:06 +03:30

45 lines
2.5 KiB
YAML

# ─────────────────────────────────────────────────────────────────────────────
# Nexus Repository Manager OSS — single pull-through mirror for everything
# ─────────────────────────────────────────────────────────────────────────────
# FIRST-TIME SETUP (run once after starting):
# docker compose -f docker-compose.mirror.yml up -d
# ./mirrors/nexus/provision.sh # creates all proxy repos + enables anon access
#
# Endpoints (after provisioning):
# UI → http://SERVER_IP:8081 (admin / see provision.sh output)
# NuGet → http://SERVER_IP:8081/repository/nuget-proxy/index.json
# npm → http://SERVER_IP:8081/repository/npm-proxy/
# Docker → http://SERVER_IP:5000 (add to /etc/docker/daemon.json)
#
# Memory: needs ~2 GB JVM heap — recommended on a server with 4 GB+ total RAM.
# Adjust INSTALL4J_ADD_VM_PARAMS below if your server has more/less RAM.
# ─────────────────────────────────────────────────────────────────────────────
services:
nexus:
image: sonatype/nexus3:latest
container_name: meezi-mirror-nexus
restart: unless-stopped
environment:
# Heap: Xmx = max Java heap. MaxDirectMemorySize = off-heap (blob cache).
# Total Nexus RAM ≈ Xmx + MaxDirectMemorySize + ~512 MB OS/JVM overhead.
# 4 GB server: values below (2 GB heap + 1 GB off-heap + 512 MB overhead ≈ 3.5 GB)
# 8 GB server: -Xms1g -Xmx4g -XX:MaxDirectMemorySize=2g
INSTALL4J_ADD_VM_PARAMS: "-Xms512m -Xmx2g -XX:MaxDirectMemorySize=1g -Djava.util.prefs.userRoot=/nexus-data/javaprefs"
volumes:
- nexus-data:/nexus-data
ports:
- "8081:8081" # Web UI + NuGet + npm REST API
- "5000:5000" # Docker Hub proxy (docker-hub-proxy repo httpPort: 5000)
- "5002:5002" # MCR proxy (mcr-proxy repo httpPort: 5002)
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8081/service/rest/v1/status"]
interval: 30s
timeout: 15s
retries: 10
start_period: 120s # Nexus JVM startup takes ~2 min on first boot
volumes:
nexus-data:
name: meezi-mirror-nexus-data