{"id":26348251,"url":"https://github.com/noelware/hazel","last_synced_at":"2025-03-16T08:14:20.508Z","repository":{"id":37046846,"uuid":"451030471","full_name":"Noelware/hazel","owner":"Noelware","description":"🪶 Minimal, and easy HTTP proxy to map storage provider items into HTTP endpoints, made in Rust.","archived":false,"fork":false,"pushed_at":"2024-04-28T09:24:33.000Z","size":632,"stargazers_count":17,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T10:14:03.283Z","etag":null,"topics":["axum","cdn","content-delivery","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Noelware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-23T07:09:37.000Z","updated_at":"2024-05-02T22:52:08.324Z","dependencies_parsed_at":"2023-02-19T20:31:06.253Z","dependency_job_id":"609a9191-4a29-403c-8b0f-64a8a23ca51a","html_url":"https://github.com/Noelware/hazel","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noelware%2Fhazel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noelware%2Fhazel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noelware%2Fhazel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Noelware%2Fhazel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Noelware","download_url":"https://codeload.github.com/Noelware/hazel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841219,"owners_count":20356446,"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":["axum","cdn","content-delivery","rust"],"created_at":"2025-03-16T08:14:19.991Z","updated_at":"2025-03-16T08:14:20.497Z","avatar_url":"https://github.com/Noelware.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch3\u003e🪶 \u003ccode\u003ehazel\u003c/code\u003e\u003c/h3\u003e\n    \u003ch4\u003eEasy to use read-only proxy to map objects to URLs\u003c/h4\u003e\n    \u003chr /\u003e\n\u003c/div\u003e\n\nHazel is Noelware's microservice to proxy our objects that we publish (like `artifacts.noelware.org` for all binary artifacts) to URLs that are mapped by their object storage location.\n\n**Hazel** was originally maintained only by [Noel Towa](https://floofy.dev) but now is maintained and controlled by the Noelware team.\n\n## Installation\n### Install Script\n**WARNING** -- Please install the scripts first and audit them before running.\n\n```shell\n# Unix:\n$ curl -fsSL https://i.noelware.org/hazel | sh -\n\n# Windows:\n$ irm https://i.noelware.org/hazel.ps1 | iex\n```\n\n### Docker\nRunning Hazel as a Docker container is the most recommended way to run the Hazel server with minimal configuration for smaller deployments. You can pull the `docker.noelware.org/noelware/hazel` image to run the Hazel server.\n\nThe image can consist with multiple tags for styles on how to deploy to your environment. We typically build the Hazel images with `linux/amd64` and `linux/arm64` architectures. Windows containers is not planned at the moment.\n\n- `latest` - Uses a specific channel to pull the image from. `latest` will be the latest stable version, `beta` will be the latest beta version.\n\n- `alpine` - This tag will use [Alpine](https://hub.docker.com/_/alpine) as the base image due to its low size to make Hazel run on low systems without a lot of system resources.\n\n\u003e [!NOTE]\n\u003e Hazel only holds persistence over files that are served from the local filesystem. If you wish to use\n\u003e other providers, this is not a required step.\n\u003e\n\u003e You can create a volume with `docker volume create`:\n\u003e ```shell\n\u003e $ docker volume create hazel\n\u003e ```\n\n\u003e [!NOTE]\n\u003e You can substitute `hazel` with any volume name, but you will have to change `hazel` to the volume\n\u003e name in later examples if you went with creating a volume with `docker volume`.\n\u003e\n\u003e For regular filesystem-mounted directories, you will need to change the ownership of the directory so\n\u003e the server can read \u0026 write to it. You can use the `chown` command to do so:\n\u003e\n\u003e ```shell\n\u003e $ chown -R 1001:1001 \u003cdirectory\u003e\n\u003e ```\n\nNow, we can pull the image from [Noelware's Container Registry](https://docker.noelware.org):\n\n```shell\n$ docker pull docker.noelware.org/noelware/hazel\n```\n\nNow, we can run the container!\n\n```shell\n# Using -v is an optional step if you're not using the local filesystem.\n$ docker run -d -p 8989:8989 --name hazel \\\n    -e HAZEL_SERVER_NAME=my-hazel-instance \\\n    -v /var/lib/noelware/hazel/data:my-volume \\\n    docker.noelware.org/noelware/hazel\n```\n\n### Helm Chart\nRefer to the [`Noelware/helm-charts`](https://github.com/Noelware/helm-charts/tree/master/charts/noelware/hazel) repository for more information.\n\n### NixOS\nOn a NixOS machine, you can use the [`nixpkgs-noelware`] overlay to install a Hazel server on a NixOS server:\n\n```nix\n{\n    services.hazel.enable = true;\n}\n```\n\nIt'll use a filesystem mapping in `/var/lib/noelware/hazel/data`, but can be overwritten with `services.hazel.fsPath`.\n\n\u003c!--\nNow, we can pull the image from [Noelware's Container Registry](https://cr.noelware.cloud):\n\n```shell\n$ docker pull cr.noelware.cloud/hazel/hazel\n```\n\nNow, we can run the container!\n\n```shell\n# Using -v is an optional step if you're not using the local\n# filesystem.\n$ docker run -d -p 8989:8989 --name hazel \\\n    -e HAZEL_SERVER_NAME=my-hazel-instance \\\n    cr.noelware.cloud/hazel/hazel\n```\n\n### Helm\nHazel does provide a Helm distribution, but it is not available as of yet!\n\n## Configuration\nHazel uses a standard YAML configuration file that can be used to configure the proxy, as **Hazel** is convention over configuration, it will proxy over the local filesystem under `/var/lib/noelware/hazel` on Linux or `$ROOT/.data` on other operating systems as there is no convention yet.\n\nHazel supports the local filesystem and Amazon S3 as Hazel is powered by the [remi-rs](https://github.com/Noelware/remi-rs) library.\n\n\u003c!--\n### Secure Strings\nTo prevent leaking sensitive data in configuration files, you can embed environment variables to create a secure string, which will allow you to use the `${}` syntax to load up an environment variable and be used by that, like in Bash.\n\n```yaml\nsentry_dsn: ${HAZEL_SENTRY_DSN:-}\n```\n\nThis will look-up the `HAZEL_SENTRY_DSN` environment variable, if it exists, the result will be the contents of the environment variable, otherwise it'll return \"null\" (or anything after `:-`).\n--\u003e\n\n## Contributing\nThanks for considering contributing to **hazel**! Before you boop your heart out on your keyboard ✧ ─=≡Σ((( つ•̀ω•́)つ, we recommend you to do the following:\n\n- Read the [Code of Conduct](./.github/CODE_OF_CONDUCT.md)\n- Read the [Contributing Guide](./.github/CONTRIBUTING.md)\n\nIf you read both if you're a new time contributor, now you can do the following:\n\n- [Fork me! ＊*♡( ⁎ᵕᴗᵕ⁎ ）](https://github.com/Noelware/hazel/fork)\n- Clone your fork on your machine: `git clone https://github.com/your-username/hazel`\n- Create a new branch: `git checkout -b some-branch-name`\n- BOOP THAT KEYBOARD!!!! ♡┉ˏ͛ (❛ 〰 ❛)ˊˎ┉♡\n- Commit your changes onto your branch: `git commit -am \"add features （｡\u003e‿‿\u003c｡ ）\"`\n- Push it to the fork you created: `git push -u origin some-branch-name`\n- Submit a Pull Request and then cry! ｡･ﾟﾟ･(థ Д థ。)･ﾟﾟ･｡\n\n## License\nHazel is released under the **Apache 2.0** License and with love :purple_heart: by [Noelware](https://noelware.org). :3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoelware%2Fhazel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoelware%2Fhazel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoelware%2Fhazel/lists"}