Compare commits

..

24 Commits

Author SHA1 Message Date
1e13b1f4e8
Remove login step for Morlana Container Registry from build workflow
All checks were successful
Building and publishing Homebrewery as Docker Image / update-description (release) Successful in 11s
Building and publishing Homebrewery as Docker Image / build (release) Successful in 12m35s
2025-07-01 15:50:56 +02:00
e1860a0f4a
Harbor is replicating the image by themself
Some checks failed
Building and publishing Homebrewery as Docker Image / update-description (release) Failing after 11s
Building and publishing Homebrewery as Docker Image / build (release) Failing after 43s
2025-07-01 15:46:53 +02:00
d6dce18bb6
Update Docker Hub description repository to kosmos367/homebrewery 2025-07-01 15:27:46 +02:00
536130d727
Update Docker registry login configuration and adjust update workflow schedule
Some checks failed
Building and publishing Homebrewery as Docker Image / update-description (release) Failing after 11s
Building and publishing Homebrewery as Docker Image / build (release) Failing after 12m8s
2025-07-01 15:20:53 +02:00
6e5d35cb55
Fix environment variable casing for license checks in update workflow
Some checks failed
Building and publishing Homebrewery as Docker Image / update-description (release) Failing after 10s
Building and publishing Homebrewery as Docker Image / build (release) Failing after 34s
2025-06-27 14:52:29 +02:00
f803541ba0
Update build workflow and README for Docker image configuration and registry logins 2025-06-27 14:19:04 +02:00
36c616d665
Add license check and issue creation for Homebrewery license changes 2025-06-27 14:14:31 +02:00
b708c21085
Update copyright notice in LICENSE to reflect full name and current year 2025-06-27 14:14:12 +02:00
589e5d8a0a
Update build workflow to trigger on release events and adjust update job to include token
All checks were successful
Building and publishing Homebrewery as Docker Image / build (release) Successful in 11m39s
2025-06-26 16:35:02 +02:00
4fb3849d8c
Change trigger from release event to push event for versioned tags in build workflow 2025-06-26 16:23:35 +02:00
2fb90b0599
Change release event type from 'published' to 'created' in build workflow 2025-06-26 16:21:49 +02:00
40ff0e437e
Refactor update job to streamline release body construction and improve readability 2025-06-26 16:15:31 +02:00
d09accc295
Refactor update job to construct release body directly in environment variable and simplify body handling 2025-06-26 16:12:55 +02:00
34af6e65d2
Refactor update job to store release data in environment variables and simplify debug step 2025-06-26 16:07:23 +02:00
cadd22d22b
Added debugging step 2025-06-26 15:57:15 +02:00
a4ed524c9b
Fix body output handling in update job for Docker release 2025-06-26 15:54:33 +02:00
4291a6c3ec
Refactor update job to fetch latest Homebrewery release using GitHub API 2025-06-26 15:51:04 +02:00
f9797244ef
Refactor Actions workflow to remove debug settings and fixing api url problems 2025-06-26 15:35:04 +02:00
00c78d51d4
Update proxy settings in Actions workflow to use internal IP addresses 2025-06-26 15:02:32 +02:00
41d0bb47a5
Add HTTPS_PROXY environment variable and refine condition for Docker release step in Actions workflow 2025-06-26 14:53:37 +02:00
ea561c9f1b
Add DEBUG environment variable to update job in Actions workflow 2025-06-26 14:14:22 +02:00
3258188bc7
Update Actions workflow to use easyware-io/get-latest-release 2025-06-26 14:04:29 +02:00
02a819c9c7
Update Actions workflow to improve concurrency and specify Ubuntu version 2025-06-26 13:52:09 +02:00
53b3ad7276
Add Actions workflow for automated Homebrewery release updates
All checks were successful
Building and publishing Homebrewery as Docker Image / build (release) Successful in 11m31s
2025-06-26 12:32:56 +02:00
5 changed files with 265 additions and 5 deletions

View File

@ -0,0 +1,9 @@
---
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,12 +24,18 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
path: homebrewery
- name: Login to GitHub Container Registry
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.morlana.online
username: ${{ github.repository_owner }}
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
uses: docker/setup-qemu-action@v3
@ -55,3 +61,20 @@ jobs:
tags: |
git.morlana.online/${{ github.repository_owner }}/homebrewery:latest
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

@ -0,0 +1,98 @@
name: Updating to latest Homebrewery Release
on:
schedule:
- cron: '0 17 * * *'
workflow_dispatch:
concurrency:
group: "update-homebrewery"
cancel-in-progress: true
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-24.04
steps:
- name: Check current license
run: |
resp=$(curl -sSf \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
https://api.github.com/repos/naturalcrit/homebrewery)
license=$(echo "$resp" | jq -r .license.spdx_id)
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
uses: softprops/action-gh-release@v2
if: ${{ env.LICENSE == 'MIT' && env.ID > 0 && env.DRAFT != 'true' }}
with:
token: ${{ secrets.GT_UPDATE_TOKEN }}
prerelease: ${{ env.PRERELEASE }}
name: ${{ env.NAME }}
tag_name: ${{ env.TAG_NAME }}
body: ${{ env.RELEASE_BODY }}
- name: Checkout Repository for issue template
if: ${{ env.LICENSE != 'MIT' }}
uses: actions/checkout@v4
- name: Create License changed issue
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
Copyright (c) 2025 f.weber
Copyright (c) 2025 - present Florian 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:

136
README.md
View File

@ -1,4 +1,134 @@
# homebrewery-docker
# Homebrewery (Unofficial) Docker Image
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
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.
---
## 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!