From b3139d9c5b053b04eaa0c6a9847f5e9e6aba6ffd Mon Sep 17 00:00:00 2001 From: Michelle Date: Wed, 13 May 2026 10:58:33 +0200 Subject: [PATCH 1/2] Edit workflow to work with GitHub Container Registry --- .github/workflows/build-and-publish.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index 0bf8ce1..40fad7c 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -19,7 +19,12 @@ jobs: # this step was made by AI, i hope it works - name: Extract registry host id: registry - run: echo "host=$(echo ${{ github.server_url }} | sed 's|https\?://||')" >> "$GITHUB_OUTPUT" + run: | + HOST=$(echo ${{ github.server_url }} | sed 's|https\?://||') + if [ "$HOST" = "github.com" ]; then + HOST="ghcr.io" + fi + echo "host=$HOST" >> "$GITHUB_OUTPUT" - name: Docker meta id: meta From 177d2e7e704cfda8319ee54f565436da08578249 Mon Sep 17 00:00:00 2001 From: Michelle Date: Wed, 13 May 2026 11:38:06 +0200 Subject: [PATCH 2/2] update README --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e96b6f..11a9fd4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,28 @@ # bnuy-api A API which collects pictures of bunnies and provides a API to get random bunny pictures. -doesn't work yet, still in progress \ No newline at end of file + +it's just a basic API right now, I want to add more sources for gifs (tenor?) and maybe more sources for pictures + +# Usage + +The API is available [here](https://bnuy-api.scrunkly.cat/random) + +# Selfhosting + +Just copy the compose.yml from the repo and copy the .env.example to .env and fill it. + +``` +# bnuy-api +POST_LIMIT=20 +LOG_LEVEL=INFO +FORWARDED_ALLOW_IPS=172.16.0.0/12 + +# Database MariaDB +DB_HOST=mariadb +DB_PORT=3306 +DB_ROOT_PASSWORD=rootpassword +DB_USER=bnuy +DB_PASSWORD=example +DB_NAME=bnuy +``` \ No newline at end of file