Minimal artefacts repository
Artefacts repositories are the legacy we inherited from ancestors. You can like it, you can dislike it, but at some moment you will have no choice. You will need to store your artefacts in private repo, that need will force you to use some very unpleasant solution. Expensive SaaS or open software with 4GB minimal RAM requirement.
That is not a problem for you if you work in some big enterprise company and all costs are covered by your organization. But working on something lite. Especially for personal needs while you develop side projects. At some point you want to reuse shared library between two separate projects, you will have to put it somewhere to be accessible to build tools like
When you first faced with that need, after first search you gonna find some ready to use solutions, but it costs either 60$ per month for basically providing you with proxy to S3 storage or it requires 8GB minimal physical memory, again to just listen to HTTP requests. That's a 21-century boy. 16 RAM GB machines are used to read and write to the network. That's how we do it.
When I faced that need, I truly speaking was kind of frustrated. Apps that I was working on were using fewer resources than simple repo required. I wasn't confused and implemented simple repository compatible with my build tool in a few minutes, but simply sniffing the traffic between
That's why I have created Nexus Minimal. Simple, small, artefacts repository in Golang.
How does it work?
Nexus repo has basically one endpoint with 2 handlers for GET and POST requests.
GET /*filepath POST /*filepath
- On GET it should return back artefact files.
- On POST it should write it down to some storage.
- Simple configuration
- Small code size
- Memory usage is super low
- Works with S3
- Works with filesystem
docker run -d -v /etc/nexus-minimal:/etc/nexus-minimal -p 8080:8080 astma/nexus-minimal
/etc/nexus-minimal or in the same directory where you run the binary.
CONFIG_PATH env variable, a full path with filename and extension.
--- http: addr: ":443" username: "myuser" password: "mypassword" https: true crt: "/certs/domain.crt" key: "/certs/domain.key" storage: type: "s3" bucket_name: "my-super-nexus-bucket" access_key: "*******************" secret_key: "**************************************"
And for file system:
--- http: addr: ":8080" username: "myuser" password: "mypassword" storage: type: "fs" base_dir: "/tmp/nexus-minimal"
Some things only look complex, hiding really basic staff under candy wrapper.