BaGet Open Source Private Nuget Repository - CloudCommandos/JohnChan GitHub Wiki

docker-stack.yaml

version: "3.8"
services:
  registry:
    image: loicsharma/baget
    ports:
      - "6080:80"
    volumes:
      - baget-data:/var/baget
    environment:
      - Mirror__Enabled=true
      - Mirror__PackageSource=https://api.nuget.org/v3/index.json
#     - Mirror__PackageSource=https://nuget.cdn.azure.cn/v3/index.json
      - AllowPackageOverwrites=true
      - ApiKey=NUGET-SERVER-API-KEY
      - Storage__Type=FileSystem
      - Storage__Path=/var/baget/packages
      - Database__Type=Sqlite
      - Database__ConnectionString=Data Source=/var/baget/baget.db
      - Search__Type=Database
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
volumes:
  baget-data:
docker stack deploy --compose-file docker-stack.yaml baget