# Local Package Registries — Nexus (Docker + npm) + Artifactory CE (Conan2) # # Nexus (Sonatype): # 8091 → Nexus web UI (admin / nexus) # 5050 → Docker hosted repository (push + pull) # Repos: Docker (local), npm (hosted + proxy + group) # # Artifactory CE (JFrog): # 8092 → Artifactory web UI (admin / password) # Repos: Conan2 (local + remote), generic # # Prerequisites — Docker Desktop must trust the insecure local registry: # Docker Desktop → Settings → Docker Engine → add to "insecure-registries": # "insecure-registries": ["localhost:5050"] # Then restart Docker Desktop. # # Note: Nexus ships amd64-only. On Apple Silicon it runs via Rosetta (works fine). # # Usage: # docker compose -f docker-compose.nexus.yml up -d # # Wait ~2 min for init containers to finish, then: # python3 deployment.py nexus push # Docker images → Nexus # python3 deployment.py npm publish-patches # Patched npm packages → Nexus # conan remote add artifactory http://localhost:8092/artifactory/api/conan/conan-local # # URLs: # Nexus: http://localhost:8091 (admin / nexus) # Artifactory: http://localhost:8092 (admin / password) # npm group: http://localhost:8091/repository/npm-group/ # Conan2: http://localhost:8092/artifactory/api/conan/conan-local services: # ============================================================================ # Sonatype Nexus — Docker registry + npm packages # ============================================================================ nexus: image: sonatype/nexus3:3.75.0 platform: linux/amd64 # Nexus has no ARM64 image; runs via Rosetta on Apple Silicon container_name: nexus-registry restart: unless-stopped ports: - "8091:8081" # Web UI + REST API - "5050:5050" # Docker hosted repository volumes: - nexus-data:/nexus-data environment: INSTALL4J_ADD_VM_PARAMS: "-Xms1g -Xmx1g -XX:MaxDirectMemorySize=1g" healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:8081/service/rest/v1/status || exit 1"] interval: 30s timeout: 10s retries: 15 start_period: 120s networks: - registry-net nexus-init: image: alpine:3.21 container_name: nexus-init depends_on: nexus: condition: service_healthy volumes: - nexus-data:/nexus-data:ro - ./nexus-init.sh:/nexus-init.sh:ro entrypoint: ["/bin/sh", "-c", "apk add --no-cache curl -q && sh /nexus-init.sh"] environment: NEXUS_URL: "http://nexus:8081" NEXUS_ADMIN_NEW_PASS: "nexus" DOCKER_REPO_PORT: "5050" restart: "no" networks: - registry-net # ============================================================================ # JFrog Artifactory CE — Conan2 package repository # ============================================================================ artifactory: image: releases-docker.jfrog.io/jfrog/artifactory-cpp-ce:latest container_name: artifactory-ce restart: unless-stopped ports: - "8092:8081" # Web UI + REST API - "8093:8082" # Service port (router/health) volumes: - artifactory-data:/var/opt/jfrog/artifactory environment: JF_SHARED_DATABASE_TYPE: derby JF_SHARED_DATABASE_ALLOWNONPOSTGRESQL: "true" EXTRA_JAVA_OPTIONS: "-Xms512m -Xmx2g" healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:8082/router/api/v1/system/health || exit 1"] interval: 30s timeout: 10s retries: 15 start_period: 120s networks: - registry-net artifactory-init: image: alpine:3.21 container_name: artifactory-init depends_on: artifactory: condition: service_healthy volumes: - ./artifactory-init.sh:/artifactory-init.sh:ro entrypoint: ["/bin/sh", "-c", "apk add --no-cache curl -q && sh /artifactory-init.sh"] environment: ARTIFACTORY_URL: "http://artifactory:8081" ARTIFACTORY_ADMIN_PASS: "password" restart: "no" networks: - registry-net volumes: nexus-data: name: nexus-data artifactory-data: name: artifactory-data networks: registry-net: name: registry-net