Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
MD023 authored Nov 24, 2024
2 parents 8146ba2 + 7909bd1 commit 3dc6bc0
Show file tree
Hide file tree
Showing 85 changed files with 3,947 additions and 2,794 deletions.
17 changes: 0 additions & 17 deletions .eslintrc.cjs

This file was deleted.

23 changes: 7 additions & 16 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ name: Dockerhub
on:
push:
tags: [v*]
branches: [ main ]


jobs:
dockerhub:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
-
name: Checkout
Expand All @@ -21,11 +20,9 @@ jobs:
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
-
name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -36,20 +33,14 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
-
name: Set tag name
run: |
if [[ ${{ github.ref_type }} == "tag" ]]; then
echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
fi
-
name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
push: true
tags: |
b4bz/homer:${{env.IMAGE_TAG}}
ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
b4bz/homer:latest
b4bz/homer:${{ github.ref_name }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
platforms: linux/amd64,linux/arm/v7,linux/arm/v6,linux/arm64
16 changes: 4 additions & 12 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,20 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

timeout-minutes: 20
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: pnpm setup
uses: pnpm/action-setup@v3
with:
version: 9
uses: pnpm/action-setup@v4
-
name: Use Node.js ${{ matrix.node-version }}
name: Node.js setup
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22
cache: 'pnpm'
-
name: install dependencies
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: pnpm setup
uses: pnpm/action-setup@v3
with:
version: 9
uses: pnpm/action-setup@v4
-
name: Use Node.js 20
name: Node.js setup
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'
-
name: Build project
Expand Down
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# build stage
FROM node:18-alpine3.19 as build-stage
FROM --platform=$BUILDPLATFORM node:22-alpine3.20 AS build-stage

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN corepack use pnpm@8

RUN corepack enable && corepack use pnpm@9

WORKDIR /app

Expand All @@ -15,17 +15,17 @@ COPY . .
RUN pnpm build

# production stage
FROM alpine:3.19
FROM alpine:3.20

ENV GID 1000
ENV UID 1000
ENV PORT 8080
ENV SUBFOLDER "/_"
ENV INIT_ASSETS 1
ENV IPV6_DISABLE 0
ENV GID=1000 \
UID=1000 \
PORT=8080 \
SUBFOLDER="/_" \
INIT_ASSETS=1 \
IPV6_DISABLE=0

RUN addgroup -S lighttpd -g ${GID} && adduser -D -S -u ${UID} lighttpd lighttpd && \
apk add -U --no-cache lighttpd
apk add -U --no-cache tzdata lighttpd

WORKDIR /www

Expand Down
116 changes: 62 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,13 @@
<h4 align="center">
A dead simple static <strong>HOM</strong>epage for your serv<strong>ER</strong> to keep your services on hand, from a simple <code>yaml</code> configuration file.
</h4>
<p align="center">
<p align="center">
<a href="https://www.buymeacoffee.com/bastien" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-yellow.png" alt="Buy Me A Coffee" height="41" width="174"></a>
<p>
<p align="center">
<strong>
<a href="https://homer-demo.netlify.app">Demo</a>
<a href="https://gitter.im/homer-dashboard/community">Chat</a>
<a href="#getting-started">Getting started</a>
</strong>
</p>
<p align="center">
<a href="https://opensource.org/licenses/Apache-2.0"><img
alt="License: Apache 2"
src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a>
<a href="https://gitter.im/homer-dashboard/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img
alt="Gitter chat"
src="https://badges.gitter.im/homer-dashboard/community.svg"></a>
<a href="https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip"><img
alt="Download homer static build"
src="https://img.shields.io/badge/Download-homer.zip-orange"></a>
Expand All @@ -41,88 +29,108 @@
</p>

<p align="center">
<img src="https://raw.github.com/bastienwirtz/homer/main/docs/screenshot.png" width="100%">
<strong>
<a href="https://homer-demo.netlify.app">Demo</a>
<a href="https://hub.docker.com/r/b4bz/homer">Docker Hub</a>
<a href="#getting-started">Get started</a>
</strong>
</p>

## Highlights

- ⚡️ Lightweight & Fast
- 🥱 Low / No maintenance
- 📄 Simple [yaml](http://yaml.org/) file configuration
- ➕ Installable (pwa)
- 🧠 Smart cards
- 🔍️ Fuzzy search
- 📂 Multi pages & item grouping
- 🎨 Theme customization
- ⌨️ keyboard shortcuts:
- <kbd>/</kbd> Start searching.
- <kbd>Escape</kbd> Stop searching.
- <kbd>Enter</kbd> Open the first matching result (respects the bookmark's `_target` property).
- <kbd>Alt</kbd> (or <kbd>Option</kbd>) + <kbd>Enter</kbd> Open the first matching result in a new tab.

## Table of Contents

- [Features](#features)
- [Getting started](#getting-started)
- [Getting started](#get-started)
- [Kubernetes Installation](docs/kubernetes.md)
- [Configuration](docs/configuration.md)
- [Theming](docs/theming.md)
- [Custom services](docs/customservices.md)
- [Smart cards](docs/customservices.md)
- [Tips & tricks](docs/tips-and-tricks.md)
- [Development](docs/development.md)
- [Troubleshooting](docs/troubleshooting.md)

## Features

- [yaml](http://yaml.org/) file configuration
- Installable (pwa)
- Search
- Grouping
- Theme customization
- Offline health check
- keyboard shortcuts:
- `/` Start searching.
- `Escape` Stop searching.
- `Enter` Open the first matching result (respects the bookmark's `_target` property).
- `Alt`/`Option` + `Enter` Open the first matching result in a new tab.

## Getting started
## Get started

Homer is a full static html/js dashboard, based on a simple yaml configuration file. See [documentation](docs/configuration.md) for information about the configuration (`assets/config.yml`) options.

It's meant to be served by an HTTP server, **it will not work if you open the index.html directly over file:// protocol**.

### Using docker

The configuration directory is bind mounted to make your dashboard easy to maintain.

**Start the container with `docker run`**

```sh
# Make sure your local config directory exists
docker run -d \
--name homer \
-p 8080:8080 \
-v </your/local/assets/>:/www/assets \
--restart=always \
--mount type=bind,source="/path/to/config/dir",target=/www/assets \
--restart=unless-stopped \
b4bz/homer:latest
```

The container will run using a user uid and gid 1000. Add `--user <your-UID>:<your-GID>` to the docker command to adjust it. Make sure this match the ownership of your assets directory.
> [!NOTE]
> The container will run using a user uid and gid 1000 by default, add `--user <your-UID>:<your-GID>` to the docker command to adjust it if necessary. Make sure this match the permissions of your assets directory.
**or `docker-compose`**

```yaml
services:
homer:
image: b4bz/homer
container_name: homer
volumes:
- /path/to/config/dir:/www/assets # Make sure your local config directory exists
ports:
- 8080:8080
user: 1000:1000 # default
environment:
- INIT_ASSETS=1 # default, requires the config directory to be writable for the container user (see user option)
restart: unless-stopped
```
**Environment variables:**
**Environment variables:**
* **`INIT_ASSETS`** (default: `1`)
- **`INIT_ASSETS`** (default: `1`)
Install example configuration file & assets (favicons, ...) to help you get started.

* **`SUBFOLDER`** (default: `null`)
If you would like to host Homer in a subfolder, (ex: *http://my-domain/**homer***), set this to the subfolder path (ex `/homer`).
- **`SUBFOLDER`** (default: `null`)
If you would like to host Homer in a subfolder, (ex: *<http://my-domain/homer>*), set this to the subfolder path (ex `/homer`).

* **`PORT`** (default: `8080`)
- **`PORT`** (default: `8080`)
If you would like to change internal port of Homer from default `8080` to your port choice.

* **`IPV6_DISABLE`** (default: 0)
- **`IPV6_DISABLE`** (default: 0)
Set to `1` to disable listening on IPv6.

#### With docker-compose

A [`docker-compose.yml`](docker-compose.yml) file is available as an example. It must be edited to match your needs. You probably want to adjust the port mapping and volume binding (equivalent to `-p` and `-v` arguments).

Then launch the container:

```sh
cd /path/to/docker-compose.yml/
docker-compose up -d
```

### Using the release tarball (prebuilt, ready to use)

Download and extract the latest release (`homer.zip`) from the [release page](https://github.com/bastienwirtz/homer/releases), rename the `assets/config.yml.dist` file to `assets/config.yml`, and put it behind a web server.

```sh
wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip
unzip homer.zip
unzip homer.zip -d homer
cd homer
cp assets/config.yml.dist assets/config.yml
npx serve # or python -m http.server 8010 or apache, nginx ...
pnpx http-server # or python -m http.server 8010 or any web server.
```

### Build manually
Expand Down
15 changes: 0 additions & 15 deletions docker-compose.yml

This file was deleted.

Loading

0 comments on commit 3dc6bc0

Please sign in to comment.