Skip to content

Commit 6ee190b

Browse files
committed
experiments: add HomeBox stack; fix gitignore workflow for experiments/
Made-with: Cursor
1 parent 0739af5 commit 6ee190b

7 files changed

Lines changed: 131 additions & 2 deletions

File tree

.github/workflows/concatenate_gitignore.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
paths:
66
- "apps/**/.gitignore"
7-
- "experimental/**/.gitignore"
7+
- "experiments/**/.gitignore"
88
- ".gitignore.initial"
99
workflow_dispatch:
1010

@@ -29,7 +29,7 @@ jobs:
2929
# they work correctly from the top-level .gitignore.
3030
# The section header names the parent directory so the origin of
3131
# each block is clear.
32-
for parent_dir in apps experimental; do
32+
for parent_dir in apps experiments; do
3333
if [ ! -d "$parent_dir" ]; then
3434
continue
3535
fi

experiments/homebox/.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Container image tag (see https://github.com/sysadminsmedia/homebox/pkgs/container/homebox )
2+
IMAGE_VERSION=latest
3+
4+
# Optional: timezone inside the container
5+
# TZ=America/Los_Angeles
6+
7+
# HomeBox merges /data/config.yml with environment variables using the HBOX_
8+
# prefix (see https://homebox.software/ ). Example behind a reverse proxy:
9+
# HBOX_OPTIONS_TRUST_PROXY=true

experiments/homebox/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

experiments/homebox/.rsync-exclude

Whitespace-only changes.

experiments/homebox/README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# homebox (experiment)
2+
3+
[HomeBox](https://github.com/sysadminsmedia/homebox) is a self-hosted home inventory and organization app (SQLite, low resource use). This stack runs the maintained **`ghcr.io/sysadminsmedia/homebox`** image (continuation of the original hay-kot project).
4+
5+
## Configuration
6+
7+
### Environment
8+
9+
Copy `.env.example` to `.env`:
10+
11+
```bash
12+
cp .env.example .env
13+
```
14+
15+
Set `IMAGE_VERSION` if you want to pin a tag other than `latest` (see [GHCR packages](https://github.com/sysadminsmedia/homebox/pkgs/container/homebox)).
16+
17+
Additional runtime tuning can use `HBOX_*` variables; see the [HomeBox documentation](https://homebox.software/).
18+
19+
### Config file (required)
20+
21+
The image expects **`/data/config.yml`** on the persistent volume (same directory as the SQLite database).
22+
23+
1. Ensure the data directory exists (repository convention):
24+
25+
```bash
26+
mkdir -p ../../lib/homebox
27+
```
28+
29+
2. Install the config once:
30+
31+
```bash
32+
cp config/config.yml.default ../../lib/homebox/config.yml
33+
```
34+
35+
3. Edit `../../lib/homebox/config.yml` as needed (public URL / hostname, OIDC, mailer, registration policy, etc.).
36+
37+
For **`latest-rootless`** or **`latest-hardened`**, the upstream image may require ownership on `/data` (e.g. `chown 65532:65532`); see the [HomeBox quick start](https://homebox.software/en/quick-start/).
38+
39+
## Networks
40+
41+
- **`nginx-proxy-net`** — attach your reverse proxy vhost to the container’s internal port **7745**.
42+
43+
## Usage
44+
45+
### Start
46+
47+
```bash
48+
docker compose up -d
49+
```
50+
51+
### Stop
52+
53+
```bash
54+
docker compose down
55+
```
56+
57+
### Logs
58+
59+
```bash
60+
docker compose logs -f
61+
```
62+
63+
### Backup
64+
65+
Back up the directory **`../../lib/homebox`** (includes `config.yml`, SQLite DB, and uploads).
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copy to ../../lib/homebox/config.yml and adjust.
2+
# The container entrypoint expects the config at /data/config.yml (same volume as SQLite).
3+
4+
mode: production
5+
6+
web:
7+
port: "7745"
8+
# Behind nginx-proxy, `trust_proxy` below (or HBOX_OPTIONS_TRUST_PROXY=true) is recommended.
9+
10+
storage:
11+
prefix_path: data
12+
conn_string: "file:///?no_tmp_dir=true"
13+
14+
database:
15+
driver: sqlite3
16+
sqlite_path: "/data/homebox.db?_pragma=busy_timeout=2000&_pragma=journal_mode=WAL&_fk=1&_time_format=sqlite"
17+
18+
options:
19+
trust_proxy: true
20+
allow_analytics: false
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
services:
2+
homebox:
3+
image: ghcr.io/sysadminsmedia/homebox:${IMAGE_VERSION:-latest}
4+
container_name: homebox
5+
hostname: homebox
6+
restart: unless-stopped
7+
env_file:
8+
- .env
9+
volumes:
10+
- ../../lib/homebox:/data
11+
# ports:
12+
# - 3100:7745
13+
networks:
14+
- proxy
15+
healthcheck:
16+
test:
17+
[
18+
"CMD",
19+
"wget",
20+
"--no-verbose",
21+
"--tries=1",
22+
"-O",
23+
"-",
24+
"http://localhost:7745/api/v1/status",
25+
]
26+
interval: 30s
27+
timeout: 5s
28+
retries: 3
29+
start_period: 15s
30+
31+
networks:
32+
proxy:
33+
external: true
34+
name: nginx-proxy-net

0 commit comments

Comments
 (0)