Files
meezi/docker-compose.mirror.yml
soroush.asadi 345ae0a4b5
CI/CD / CI · Admin API (dotnet build) (push) Successful in 41s
CI/CD / CI · Admin Web (tsc) (push) Failing after 5s
CI/CD / CI · Website (tsc) (push) Failing after 4s
CI/CD / CI · Koja (tsc) (push) Failing after 5s
CI/CD / CI · API (dotnet build + test) (push) Successful in 1m13s
CI/CD / CI · Dashboard (tsc) (push) Failing after 2m32s
CI/CD / Deploy · all services (push) Has been skipped
first commit
2026-05-31 11:06:24 +03:30

45 lines
2.6 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 → https://mirror.soroushasadi.com/ (admin / see provision.sh output)
# NuGet → https://mirror.soroushasadi.com/repository/nuget-group/index.json
# npm → https://mirror.soroushasadi.com/repository/npm-group/
# Docker → https://mirror.soroushasadi.com (add to daemon.json registry-mirrors)
#
# 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