Compare commits

..

No commits in common. "main" and "v3.15.0" have entirely different histories.

5 changed files with 24 additions and 247 deletions

View File

@ -1,9 +0,0 @@
---
title: License of upstream Homebrewery has changed
assignees: f.weber
labels: bug
---
It seems that [naturalcrit/homebrewery](https://github.com/naturalcrit/homebrewery) is not using the MIT license anymore.
We have to check that and if we are still allowed to use their project.

View File

@ -24,18 +24,12 @@ jobs:
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
path: homebrewery path: homebrewery
- name: Login to Gitea Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.morlana.online registry: git.morlana.online
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_TOKEN }} password: ${{ secrets.DOCKER_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -61,20 +55,3 @@ jobs:
tags: | tags: |
git.morlana.online/${{ github.repository_owner }}/homebrewery:latest git.morlana.online/${{ github.repository_owner }}/homebrewery:latest
git.morlana.online/${{ github.repository_owner }}/homebrewery:${{ github.event.release.tag_name }} git.morlana.online/${{ github.repository_owner }}/homebrewery:${{ github.event.release.tag_name }}
kosmos367/homebrewery:latest
kosmos367/homebrewery:${{ github.event.release.tag_name }}
update-description:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: kosmos367/homebrewery

View File

@ -2,97 +2,36 @@ name: Updating to latest Homebrewery Release
on: on:
schedule: schedule:
- cron: '0 17 * * *' - cron: '0 9,17 * * *'
workflow_dispatch: workflow_dispatch:
concurrency:
group: "update-homebrewery"
cancel-in-progress: true
permissions: permissions:
contents: write contents: write
jobs: jobs:
update: test:
runs-on: ubuntu-24.04 runs-on: ubuntu-latest
steps: steps:
- name: Check current license - name: Get latest homebrewery release
run: | id: latest_release
resp=$(curl -sSf \ uses: kaliber5/action-get-release@v1
-H "Accept: application/vnd.github.v3+json" \ with:
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \ token: ${{ secrets.GH_TOKEN }}
https://api.github.com/repos/naturalcrit/homebrewery) repo: homebrewery
owner: naturalcrit
license=$(echo "$resp" | jq -r .license.spdx_id) latest: true
draft: false
echo "LICENSE=$license" >>"$GITHUB_ENV"
- name: Get latest Homebrewery release via GitHub API
if: ${{ env.LICENSE == 'MIT' }}
run: |
resp=$(curl -sSf \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
https://api.github.com/repos/naturalcrit/homebrewery/releases/latest)
id=$( echo "$resp" | jq -r .id)
tag_name=$( echo "$resp" | jq -r .tag_name)
name=$( echo "$resp" | jq -r .name)
url=$( echo "$resp" | jq -r .html_url)
draft=$( echo "$resp" | jq -r .draft)
prerelease=$( echo "$resp" | jq -r .prerelease)
body_text=$( echo "$resp" | jq -r .body)
echo "ID=$id" >>"$GITHUB_ENV"
echo "TAG_NAME=$tag_name" >>"$GITHUB_ENV"
echo "NAME=$name" >>"$GITHUB_ENV"
echo "URL=$url" >>"$GITHUB_ENV"
echo "DRAFT=$draft" >>"$GITHUB_ENV"
echo "PRERELEASE=$prerelease" >>"$GITHUB_ENV"
{
echo "RELEASE_BODY<<EOF"
printf '%s\n' "# Homebrewery $name Image"
printf '\n'
printf '%s\n' "> _This is an automated Docker Image update. Nothing other than the Homebrewery version changed._"
printf '\n'
printf '%s\n' "$body_text"
printf '\n'
printf '%s\n' "See original Changelog from [$name]($url)"
echo "EOF"
} >>"$GITHUB_ENV"
- name: Debug step
if: ${{ env.LICENSE == 'MIT' }}
run: |
echo "id: $ID"
echo "draft: $DRAFT"
echo "tag_name: $TAG_NAME"
echo "name: $NAME"
echo "url: $URL"
echo "prerelease: $PRERELEASE"
- name: Create Docker Release - name: Create Docker Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
if: ${{ env.LICENSE == 'MIT' && env.ID > 0 && env.DRAFT != 'true' }}
with: with:
token: ${{ secrets.GT_UPDATE_TOKEN }} prerelease: ${{ steps.latest_release.prerelease }}
prerelease: ${{ env.PRERELEASE }} name: ${{ steps.latest_release.name }}
name: ${{ env.NAME }} tag_name: ${{ steps.latest_release.tag_name }}
tag_name: ${{ env.TAG_NAME }} body: |
body: ${{ env.RELEASE_BODY }} # Homebrewery ${{ steps.latest_release.name }} Image
- name: Checkout Repository for issue template _This is an automated Docker Image update. Nothing other than the Homebrewery version changed._
if: ${{ env.LICENSE != 'MIT' }}
uses: actions/checkout@v4
- name: Create License changed issue See original Changelog from [${{ steps.latest_release.name }}](${{ steps.latest_release.url }})
uses: JasonEtco/create-an-issue@v2
if: ${{ env.LICENSE != 'MIT' }}
env:
GITHUB_TOKEN: ${{ secrets.GT_UPDATE_TOKEN }}
with:
update_existing: true
search_existing: open
filename: .gitea/ISSUE_LICENSE_CHANGED.md

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2025 - present Florian Weber Copyright (c) 2025 f.weber
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

136
README.md
View File

@ -1,134 +1,4 @@
# Homebrewery (Unofficial) Docker Image # homebrewery-docker
An unofficial, prebuilt Docker image for [NaturalCrits Homebrewery](https://github.com/naturalcrit/homebrewery), with sensible defaults and full configuration via environment variables. Published to Docker Hub and mirrored on my Gitea instance to avoid Docker Hub pull-rate limits. Create authentic looking D&D homebrews using only markdown.
This is an automatic build of the docker image from official repository at: https://github.com/naturalcrit/homebrewery
---
## Features
- **Prebuilt image** based on `node:22-alpine`
- Auto-fetches and builds the latest Homebrewery release (tags mirror upstream)
- Configure entirely via **environment variables**—no need to mount a JSON file
- Optional mounting of custom images/fonts
---
## Image Names & Tags
- **Docker Hub**: `kosmos367/homebrewery`
- **Gitea Registry**: `git.morlana.online/f.weber/homebrewery`
- **Tags**: Mirror upstream releases (e.g. `v3.14.3`, `v3.15.0`, …). Updated twice daily.
---
## Environment Variables
| Variable | Default | Description |
| ---------------------- | ---------------------------------------- | -------------------------------- |
| `NODE_ENV` | `docker` | Node environment |
| `PORT` | `8000` | Port on which Homebrewery serves |
| `HB_HOST` | `homebrewery.local.naturalcrit.com:8000` | Hostname for generated config |
| `HB_NATURALCRIT_URL` | `local.naturalcrit.com:8010` | Base URL of NaturalCrit site |
| `HB_SECRET` | `secret` | Session secret |
| `HB_ENABLE_V3` | `true` | Enable v3 editor mode |
| `HB_ENABLE_THEMES` | `true` | Enable theming support |
| `HB_PUBLIC_URL` | `https://homebrewery.naturalcrit.com` | Public URL for links |
| `HB_LOCAL_ENVIRONMENT` | `docker` | Local environment tag |
| `HB_DB_URI` | `mongodb://mongodb/homebrewery` | MongoDB connection URI |
| `HB_IMAGES` | `null` | Path for static images |
| `HB_FONTS` | `null` | Path for static fonts |
> **Tip**: If you prefer, mount your own JSON config at `/usr/src/app/config/docker.json` instead of using env vars.
---
## Exposed Ports & Volumes
- **Port**: `8000/tcp` (or as set via `PORT`)
- **Optional volumes**:
- `/usr/src/app/images` (use with `HB_IMAGES`)
- `/usr/src/app/fonts` (use with `HB_FONTS`)
- Data persistence is handled via MongoDB.
---
## Example: `docker-compose.yml`
```yaml
version: "3.8"
services:
homebrewery:
image: kosmos367/homebrewery:latest
container_name: homebrewery
environment:
HB_HOST: "homebrewery.example.com"
HB_SECRET: "your-secret-key"
HB_PUBLIC_URL: "https://homebrewery.example.com"
HB_DB_URI: "mongodb://mongo:27017/homebrewery"
# Optional mounts:
# HB_IMAGES: '/usr/src/app/images'
# HB_FONTS: '/usr/src/app/fonts'
ports:
- "8000:8000"
# Optional volumes for customization
#volumes:
# - images-data:/usr/src/app/images
# - fonts-data:/usr/src/app/fonts
depends_on:
- mongo
mongo:
image: mongo:latest
container_name: homebrewery-db
volumes:
- mongo-data:/data/db
volumes:
mongo-data:
# Optional volumes for customization
# images-data:
# fonts-data:
```
---
## Repository & Registry Links
- **Gitea repository** (Dockerfile, CI/CD, etc.):
[https://git.morlana.online/f.weber/homebrewery-docker](https://git.morlana.online/f.weber/homebrewery-docker)
- **Gitea Docker registry**:
[https://git.morlana.online/f.weber/homebrewery-docker/packages](https://git.morlana.online/f.weber/homebrewery-docker/packages)
- **Upstream Homebrewery**:
[https://github.com/naturalcrit/homebrewery](https://github.com/naturalcrit/homebrewery)
**Pull example for all available registries:**
```bash
docker pull kosmos367/homebrewery
docker pull git.morlana.online/f.weber/homebrewery
docker pull reg.morlana.net/homebrewery
```
---
## Maintainer
Florian Weber [kosmos@morlana.net](mailto:kosmos@morlana.net)
---
## License
This Docker wrapper is released under the **MIT License**, same as the original Homebrewery project.
---
> ⚠️ **Disclaimer**
> This is **not** an official Homebrewery image. It is provided “as-is” with no affiliation to NaturalCrit. Use at your own risk.
---
Feel free to suggest tweaks or additional sections—happy to refine!