panamax-rs / panamax

Mirror rustup and crates.io repositories, for offline Rust and cargo usage.
Apache License 2.0
427 stars 45 forks source link

[Question] Use S3/minio to host /mirror? #131

Closed xulai1001 closed 2 months ago

xulai1001 commented 2 months ago

According to the Readme file, panamax will sync all the crates to a local directory /mirror. Is it possible to put the mirror onto some local object storage platforms, such as s3 or minio? ( or Gitlab package registry )

k3d3 commented 2 months ago

As long as you have the ability to mount that S3 bucket as a filesystem, via something like s3 mountpoint, it should work. I haven't used S3 in that way before so YMMV.

xulai1001 commented 2 months ago

Thanks for your timely reply! I can try it out then.

xulai1001 commented 2 months ago

As long as you have the ability to mount that S3 bucket as a filesystem, via something like s3 mountpoint, it should work. I haven't used S3 in that way before so YMMV.

Unfortunately, I could only sync from a crates mirror site which uses the old directory format, which is unsupported by "newer" versions of panamax. Therefore I just git-cloned the crates.io-index repo, and put mirrored ".crate" files in an object storage, to enable read-only "cargo fetch" with hand-crafted index config.json file. No API support. I may configure a separate private registry for uploading later.