Hex.pm mirror for isolated environments

Starting November, I will spend one year in Kerguelen Islands as the System Administrator of the scientific base. There, internet access is very low—understand: 100 kb/s for 40 to 100 persons, therefore reserved for professional activities. Provided this constraint, I am currently working on getting my whole development environment offline-ready. I’ve started reasearch about building a local binary cache for Nix and crates.io (the Rust equivalent for hex.pm). Now, I am here for the Elixir part.

I want to be able to start new Elixir projects there. To achieve this, I would like to setup an offline read-only hex.pm mirror. Here are my questions:

  1. How can I get a full copy of the hex.pm repository?
  2. What do I need to use it with Mix, so I can do mix deps.get and my dependencies are fetched from the local cache?
  3. Would it be possible to setup a local copy for the web interface too, so I could search and browse the packages? Otherwise, how to look for packages for a new use case?
  4. Same for Hexdocs, it would be neat to have it offline too.

These options would be interesting for other kind of isolated environments, like restricted networks in some companies for instance.

2 Likes

By chance MiniRepo was just released, a mini version of hex. :slight_smile:

As for a duplicate of hex.pm, that sounds large, probably have to ask one of the platformatic people here, @josevalim is one, unsure who else?

You can generate docs from packages in hex too for note. :slight_smile:

1 Like