homebrewery-docker/README.md

135 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Homebrewery (Unofficial) Docker Image
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!