thiagohdeplima
My team is building various micro-services using elixir.
Some of needs of systems is shared (for example: authentication).
To not duplicate code in each system, we create a some libraries implementing shared code between systems. This libraries contains business rules, therefore, not be open-sourced.
I would like create a private repository in our infrastructure, but, I dont find a documentation wich describe the process of it to me.
Analising the mix deps.get behavior, I see it gets packages from repo.hex.pm, which in turn is a S3 bucket, therefore, I conclude that it is not very hard.
Can someone help-me to found the documentation about it?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
I’m trying to set up Emacs with elixir-ls via lsp-mode and credo via Flycheck. This should mostly be preconfigured as Flycheck picks up c...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
idi527
Maybe reading through GitHub - hexpm/hexpm: API server and website for Hex · GitHub or GitHub - hexpm/hex: Package manager for the Erlang ecosystem. · GitHub might help.
aseigo
There is good documentation at https://hex.pm itself. You can host your own internal installation of hexpm (it’s a Phoenix app, yay!
) and then you can use the :repo option in the relevant depencies in the mix.exs file as noted in the docs here.
chulkilee
Another option: use git (if you use git
)
You can specify git url and ref/tag (see git options), or use submodule with path option.
There is also Private packages in Hex (currently in beta), which has different pros & cons.
From my experience on using private repo for ruby gem… git way is much simpler since you can use git+ssh authentication like the main repo. There are some benefits of having private package repo for backup and audit purpose, but that usually applies only when you fetch all packages from the repo.
There is already a request to support hex on Artifactory - RTFACT-14011: Support for Erlang “hex” repos.
josevalim
Git works if you have one or two packages but at the moment you have multiple packages and they depend each other, Hex private is probably the best option since we can’t perform dependency resolution on top of Git.
chulkilee
As far as I remember, just for comparison, Ruby bundler uses git to fetch packages and then checks gemspec for version and its dependency - so I can keep two private packages in git, depending each other with version constraints.
How does mix handle this? It seems to do the same thing.
The obvious disadvantages of using git is that you now need to resolve version constraints since you do not use hex.
zazaian
I don’t know if this existed at the time this thread was originally posted, but looks like setting up an
organizationon http://hex.pm is going to be the cleanest way to do this. You could deploy your own self-hosted version of the hex.pm app but it seems that this is ultimately going to be the easiest way to get going out of the box that still permits full resolution dependency, and without having to personally maintain an external/private hex.pm service.Remember that with git you can access individual private repositories from a github account, but as @josevalim mentioned
mixwill not perform dependency resolution on those apps and you may end up with conflicts, and possibly having to maintain the dependencies for your private elixir libraries in the top-level app in which they’re being used. This might work for a very simple application but breaks and is clumsy to maintain at scale.If you don’t want to use hex.pm organizations for whatever reason I’m sure you could also configure this on your own server, though the setup overhead will be more involved. I get the sense too that hex.pm organizations will become an increasingly common workflow in Elixir projects, and will be easier to onboard other developers already familiar with that relatively straightforward process.
zazaian
Apparently I’m still locked on this topic - @wojtekmach introduced MiniRepo roughly three months ago which looks like a good way to get a quick, private hex server up and running if cloning and deploying all of hex.pm proves to be overkill.
That said, I’ve found @ericmj and the hex.pm team to be extremely helpful and supportive. Seems like any of the above options will work well. Really just depends on personal preferences.
zazaian
One more note here - I recently spent a couple of hours digging through the hex.pm application source code and deploying the application locally. While it’s pretty easy to get it going in development, the
prodenvironment has a few runtime dependencies for services like a Fastly-backed CDN, Rollbar error handling, AWS credentials for S3 access, and mailer credentials, which may be overkill for a small internal deployment.Here is the full scope of the environment variables required by a production release:
Hex.pm releases are also configured for Docker by default, backed by Kubernetes, which may additionally prove overkill for a smaller setup with a handful of users. That said, bootstrapping an edeliver config is not difficult for this setup and was easy to get going.
apreifsteck
Hello! For reasons that are not good, but beyond my control, I find myself trying to roll a self-hosted hexpm server. I’m currently working on adding azure blobs as a storage client. In my tests I am able to push a package to my local instance and pull it back down, but I have to set the environment variable
HEX_NO_VERIFY_REPO_ORIGIN=1. When I do not set this I get the errorDoes anyone know how to “update to fix the security reason”? I wasn’t able to find any documentation about it except for this entry in the hex documentation, but that didn’t give me a direction on how to fix it… The only thing I’ve really changed is the storage layer. Otherwise I’m running the dev server, so maybe it’s because some of this config from
runtime.exsis going unset?Apologies for the possible naive question (and reviving a dormant thread). I’m not very security-literate so it’s been difficult to try and puzzle my way through this.