{"id":15314253,"url":"https://github.com/barelyhuman/goblin","last_synced_at":"2025-04-05T05:04:19.493Z","repository":{"id":43152861,"uuid":"446771872","full_name":"barelyhuman/goblin","owner":"barelyhuman","description":"Golang binaries compiled on-demand for your system","archived":false,"fork":false,"pushed_at":"2024-12-13T05:47:07.000Z","size":409,"stargazers_count":150,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-03-29T04:04:44.999Z","etag":null,"topics":["cross-compilations","go-tools","golang","golang-tools","self-hosted","service"],"latest_commit_sha":null,"homepage":"http://goblin.run","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barelyhuman.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"liberapay":"reaper","ko_fi":"barelyreaper","github":"barelyhuman","custom":"https://barelyreaper.gumroad.com/coffee"}},"created_at":"2022-01-11T10:18:30.000Z","updated_at":"2025-03-07T16:14:11.000Z","dependencies_parsed_at":"2024-02-03T23:27:01.318Z","dependency_job_id":"f8a922cc-efc6-40e5-94e6-11e101db7183","html_url":"https://github.com/barelyhuman/goblin","commit_stats":{"total_commits":121,"total_committers":4,"mean_commits":30.25,"dds":0.05785123966942152,"last_synced_commit":"c32cecbbe7a706fbc4c180fe5073cb9ef72fb599"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fgoblin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fgoblin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fgoblin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fgoblin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barelyhuman","download_url":"https://codeload.github.com/barelyhuman/goblin/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289424,"owners_count":20914464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross-compilations","go-tools","golang","golang-tools","self-hosted","service"],"created_at":"2024-10-01T08:44:52.624Z","updated_at":"2025-04-05T05:04:19.469Z","avatar_url":"https://github.com/barelyhuman.png","language":"Go","readme":"# goblin\n\n\u003e [gobinaries](https://gobinaries.com/) alternative\n\nSimply put it's a lot of code that's been picked up from the original\n[gobinaries](https://github.com/tj/gobinaries) and the majority of the reason is\nthat most of the research for the work has been already done there.\n\nThe reason for another repo is that the development on gobinaries has been slow\nfor the past few months / years at this point and go has moved up 2 version and\npeople are still waiting for gobinaries to update itself.\n\n**All credits to [tj](https://github.com/tj) for the idea and the initial\nimplementation.**\n\n- [goblin](#goblin)\n  - [Why not fork?](#why-not-fork)\n  - [Highlights](#highlights)\n  - [Roadmap](#roadmap)\n  - [Authors](#authors)\n  - [Usage](#usage)\n  - [Exposed API](#exposed-api)\n  - [Deploy your own](#deploy-your-own)\n    - [Existing Image](#existing-image)\n      - [Using Docker](#using-docker)\n      - [Using Traditional Servers](#using-traditional-servers)\n  - [Configuration](#configuration)\n  - [License](#license)\n\n## Why not fork?\n\nTo keep it short, it's fun to build the arch from scratch, helps you learn. Also\nthe mentality of both the authors differ.\n\n(was easier to start from scratch then remove each blocking thing from the\noriginal one)\n\n## Highlights\n\n- Easy to use - Users don't need go to install your CLI\n- Works with most common package ( Raise an [issue](/issues) if you find it not\n  working with something)\n- Persistence ( can be made into a temporary cache to minimize storage costs)\n- Self Hostable\n\n## Roadmap\n\n- [x] Cache a previously built version binary\n  - Builds are cache for 6 hours due reduce storage costs, since it's run by a\n    solo developer\n- [ ] Add support for download binaries from existing Github Release artifacts\n\n## Authors\n\n[Reaper](https://github.com/barelyhuman), [Mvllow](https://github.com/mvllow)\n\n## Usage\n\nYou can read about it on [https://goblin.run](https://goblin.run)\n\n## Exposed API\n\n\u003csmall\u003e from v0.4.0 \u003c/small\u003e\nThe server exposes a the following public routes usable for information\n\n**`GET /version/\u003cpath\u003e/\u003cto\u003e/\u003cpkg\u003e`**\n\n- A `GET /version` request on a package path for example `github.com/barelyhuman/commitlog/v3` would give you the latest version resolved for it by comparing it on the goproxy and github's repo tags. This is the same algo used internally by Goblin and is available to you.\n\n## Deploy your own\n\nSince the entire reason for doing this was that delay on the original\nimplementation added a lot more handling and addition of scripts to my website\ndeployments than I liked.\n\nI wouldn't want that to happen again, so I really recommend people to spin up\ntheir own instances if they can afford to do so. If not, you can always use the\nhosted version from me at [goblin.run](https://goblin.run)\n\n**Note:the original code for gobinaries is equally simple to use and deploy but\nyou'll have to make a few tweaks to the original code to make it work in a\nsimpler fashion**\n\n### Existing Image\n\nThe repository builds and publishes a `latest` and a semver tagged version on each release. You can use that if you do not wish to tweak or change anything in the original source code and build structure\n\n```sh\n$ docker run -p \"3000:3000\" ghcr.io/barelyhuman/goblin:latest\n# change the domain to whatever you are using for it\n$ docker run -e \"GOBLIN_ORIGIN_URL=example.com\" -p \"3000:3000\" ghcr.io/barelyhuman/goblin:latest\n```\n\n#### Using Docker\n\n1. Setup docker or any other platform that would allow you to build and run\n   docker images, if using services like Digital Ocean or AWS, you can use their\n   container and docker image specific environments\n2. Build the image\n\n```sh\ncd goblin\ndocker build -t goblin:latest .\n```\n\n3. And finally push the image to either of the environments as mentioned in\n   point 1. If doing it on a personal compute instance, you can just install\n   docker, do step 3 and then run the below command.\n\n```sh\ndocker run -p \"3000:3000\" goblin:latest\n```\n\n#### Using Traditional Servers\n\nLet's face it, docker can be heavy and sometimes it's easier to run these apps\nseparately as a simple service.\n\nMuch like most go lang projects, goblin can be built into a single binary and\nrun on any open port.\n\nThe repo comes with helper scripts to setup an ubuntu server with the required\nstuff\n\n1. Caddy for server\n2. Go and Node for language support\n3. PM2 as a process manager and start the process in the background\n\nYou can run it like so\n\n```sh\n./scripts/prepare-ubuntu.sh\n```\n\nIf you already have all the above setup separately, you can modify the build\nscript and run that instead.\n\n```sh\n./scripts/build.sh\n```\n\nYou'll have to create 2 `.env` files, one inside `www` and one at the root\n`.env`\n\n```sh\n# .env\n\n# token from github that allows authentication for resolving versions from go modules as github repositories\nGITHUB_TOKEN=\n#  the url that you want the server to use for creating scripts\nORIGIN_URL=\n```\n\n```sh\n# www/.env\n\n# the same url as ORIGIN_URL but added again because the static build needs it in the repo\nGOBLIN_ORIGIN_URL=\n```\n\nrunning the `build.sh` should handle building with the needed env files and\nrestarting the server for you.\n\n## Configuration\n\nThe server can be configured easily using environment variables\n\n| KEY                   | default                    | description                                                                          | options         |\n| --------------------- | -------------------------- | ------------------------------------------------------------------------------------ | --------------- |\n| STORAGE_ENABLED       | `false`                    | Enable persistence                                                                   | `true`          |\n| STORAGE_CLIENT_ID     | \u003cempty\u003e                    | CLIENT_ID of a S3 compatible storage                                                 |                 |\n| STORAGE_CLIENT_SECRET | \u003cempty\u003e                    | CLIENT_SECRET of a S3 compatible storage                                             |                 |\n| STORAGE_ENDPOINT      | \u003cempty\u003e                    | Endpoint value of an S3 compatible storage                                           |                 |\n| STORAGE_BUCKET        | \u003cempty\u003e                    | Bucket name of the S3 compatible storage                                             |                 |\n| STORAGE_BUCKET_PREFIX | \u003cempty\u003e                    | folder/namespace to store the files inside the bucket                                |                 |\n| PORT                  | `3000`                     | Default port for running the application                                             |                 |\n| ORIGIN_URL            | `http://localhost:${PORT}` | Default URL of the application                                                       |                 |\n| GITHUB_TOKEN          | \u003cempty\u003e                    | Github authentication token for accessing github repositories and resolving versions |                 |\n| CLEAR_CACHE_TIME      | \u003cempty\u003e                    | Duration used to clear and set expiry for stored binaries                            | `1m`,`30s`, etc |\n\n## License\n\n[MIT](/LICENSE)\n","funding_links":["https://liberapay.com/reaper","https://ko-fi.com/barelyreaper","https://github.com/sponsors/barelyhuman","https://barelyreaper.gumroad.com/coffee"],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fgoblin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarelyhuman%2Fgoblin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fgoblin/lists"}