Compare commits
6 commits
edit-setti
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 02fdc0ed79 | |||
| d47393fa48 | |||
| 42b795ae35 | |||
| 2b38d0d4b2 | |||
| b82316752d | |||
| a592b310b1 |
5 changed files with 217 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
image: registry.nemunai.re/hathoris:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
image: nemunaire/hathoris:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||||
{{#if build.tags}}
|
{{#if build.tags}}
|
||||||
tags:
|
tags:
|
||||||
{{#each build.tags}}
|
{{#each build.tags}}
|
||||||
|
|
@ -6,16 +6,16 @@ tags:
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
manifests:
|
manifests:
|
||||||
- image: registry.nemunai.re/hathoris:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
- image: nemunaire/hathoris:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||||
platform:
|
platform:
|
||||||
architecture: amd64
|
architecture: amd64
|
||||||
os: linux
|
os: linux
|
||||||
- image: registry.nemunai.re/hathoris:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
- image: nemunaire/hathoris:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||||
platform:
|
platform:
|
||||||
architecture: arm64
|
architecture: arm64
|
||||||
os: linux
|
os: linux
|
||||||
variant: v8
|
variant: v8
|
||||||
- image: registry.nemunai.re/hathoris:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
- image: nemunaire/hathoris:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||||
platform:
|
platform:
|
||||||
architecture: arm
|
architecture: arm
|
||||||
os: linux
|
os: linux
|
||||||
|
|
|
||||||
154
.drone.yml
154
.drone.yml
|
|
@ -71,11 +71,23 @@ steps:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
|
- name: github release
|
||||||
|
image: plugins/github-release:linux-arm
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: github_api_token
|
||||||
|
github_url: https://github.com
|
||||||
|
files:
|
||||||
|
- deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}hf
|
||||||
|
- deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker:linux-arm
|
image: plugins/docker:linux-arm
|
||||||
settings:
|
settings:
|
||||||
registry: registry.nemunai.re
|
repo: nemunaire/hathoris
|
||||||
repo: registry.nemunai.re/hathoris
|
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
dockerfile: Dockerfile-norebuild
|
dockerfile: Dockerfile-norebuild
|
||||||
|
|
@ -90,6 +102,142 @@ trigger:
|
||||||
- push
|
- push
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: build-amd64
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /go
|
||||||
|
path: src/git.nemunai.re/nemunaire/hathoris
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build front
|
||||||
|
image: node:21
|
||||||
|
commands:
|
||||||
|
- mkdir deploy
|
||||||
|
- cd ui
|
||||||
|
- npm install --network-timeout=100000
|
||||||
|
- npm run build
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: golang:1-alpine
|
||||||
|
commands:
|
||||||
|
- apk --no-cache add alsa-lib-dev build-base git pkgconf
|
||||||
|
- go get -v -d
|
||||||
|
- go vet -v
|
||||||
|
- go build -v -ldflags '-w -X main.Version=${DRONE_BRANCH}-${DRONE_COMMIT} -X main.build=${DRONE_BUILD_NUMBER}' -o deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
|
- ln deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} hathoris
|
||||||
|
|
||||||
|
- name: gitea release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_api_key
|
||||||
|
base_url: https://git.nemunai.re/
|
||||||
|
files:
|
||||||
|
- deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
|
|
||||||
|
- name: github release
|
||||||
|
image: plugins/github-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: github_api_token
|
||||||
|
github_url: https://github.com
|
||||||
|
files:
|
||||||
|
- deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: nemunaire/hathoris
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
|
dockerfile: Dockerfile-norebuild
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: build-arm64
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /go
|
||||||
|
path: src/git.nemunai.re/nemunaire/hathoris
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build front
|
||||||
|
image: node:21
|
||||||
|
commands:
|
||||||
|
- mkdir deploy
|
||||||
|
- cd ui
|
||||||
|
- npm install --network-timeout=100000
|
||||||
|
- npm run build
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: golang:1-alpine
|
||||||
|
commands:
|
||||||
|
- apk --no-cache add alsa-lib-dev build-base git pkgconf
|
||||||
|
- go get -v -d
|
||||||
|
- go vet -v
|
||||||
|
- go build -v -ldflags '-w -X main.Version=${DRONE_BRANCH}-${DRONE_COMMIT} -X main.build=${DRONE_BUILD_NUMBER}' -o deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
|
- ln deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} hathoris
|
||||||
|
|
||||||
|
- name: gitea release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_api_key
|
||||||
|
base_url: https://git.nemunai.re/
|
||||||
|
files:
|
||||||
|
- deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
|
|
||||||
|
- name: github release
|
||||||
|
image: plugins/github-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: github_api_token
|
||||||
|
github_url: https://github.com
|
||||||
|
files:
|
||||||
|
- deploy/hathoris-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: nemunaire/hathoris
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||||
|
dockerfile: Dockerfile-norebuild
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: docker-manifest
|
name: docker-manifest
|
||||||
|
|
@ -113,4 +261,6 @@ trigger:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- build-amd64
|
||||||
|
- build-arm64
|
||||||
- build-arm
|
- build-arm
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,11 @@ RUN go get && go generate && go build -ldflags="-s -w"
|
||||||
|
|
||||||
FROM alpine:3.18
|
FROM alpine:3.18
|
||||||
|
|
||||||
|
ENV HATHORIS_BIND=:8080
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ["/srv/hathoris"]
|
ENTRYPOINT ["/srv/hathoris"]
|
||||||
|
WORKDIR /var/lib/hathoris
|
||||||
|
|
||||||
|
RUN mkdir /var/lib/hathoris; apk --no-cache add alsa-utils pulseaudio-utils mpv yt-dlp
|
||||||
|
|
||||||
COPY --from=build /go/src/git.nemunai.re/nemunaire/hathoris/hathoris /srv/hathoris
|
COPY --from=build /go/src/git.nemunai.re/nemunaire/hathoris/hathoris /srv/hathoris
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
FROM alpine:3.18
|
FROM alpine:3.18
|
||||||
|
|
||||||
|
ENV HATHORIS_BIND=:8080
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ["/srv/hathoris"]
|
ENTRYPOINT ["/srv/hathoris"]
|
||||||
|
WORKDIR /var/lib/hathoris
|
||||||
|
|
||||||
|
RUN mkdir /var/lib/hathoris; apk --no-cache add alsa-utils pulseaudio-utils mpv yt-dlp
|
||||||
|
|
||||||
COPY hathoris /srv/hathoris
|
COPY hathoris /srv/hathoris
|
||||||
|
|
|
||||||
52
README.md
52
README.md
|
|
@ -47,8 +47,47 @@ Hathoris is compatible with any Linux distribution that has PulseAudio. It also
|
||||||
|
|
||||||
### Quick Installation Guide
|
### Quick Installation Guide
|
||||||
|
|
||||||
TODO: Add a quick installation guide.
|
#### With Docker
|
||||||
|
|
||||||
|
[Prepare a configuration for optional virtual inputs](#audio-sources) (like radios, streaming sources), create the file at `~/.config/hathoris/settings.json`.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -p 8080:8080 \
|
||||||
|
--device /dev/snd \
|
||||||
|
-e PULSE_SERVER=unix:/run/pulse/native \
|
||||||
|
-v ${XDG_RUNTIME_DIR}/pulse/native:/run/pulse/native \
|
||||||
|
-v ~/.config/pulse/cookie:/root/.config/pulse/cookie \
|
||||||
|
-v ~/.config/hathoris:/var/lib/hathoris \
|
||||||
|
nemunaire/hathoris:1
|
||||||
|
```
|
||||||
|
|
||||||
|
⚠️ Please note that if your host is directly reachable on the Internet, it will be accessible to anyone who can reach this port. It is recommended to use a reverse proxy and/or configure proper firewall rules to secure your setup.
|
||||||
|
|
||||||
|
#### Without Docker
|
||||||
|
|
||||||
|
1. Install dependancies.
|
||||||
|
|
||||||
|
- On Debian/Ubuntu/Raspbian/armbian/...: `sudo apt install alsa-utils pulseaudio-utils mpv yt-dlp`
|
||||||
|
- On Alpine: `sudo apk add alsa-utils pulseaudio-utils mpv yt-dlp`
|
||||||
|
- On ArchLinux/Manjaro: `sudo pacman -S alsa-utils pulseaudio mpv yt-dlp`
|
||||||
|
|
||||||
|
2. Download the [latest release binary for your architecture](https://github.com/nemunaire/hathoris/releases/latest); choose between ARMv6 (Raspberry Pi Zero), ARMv7 (Voltastreams, Raspberry Pi 2+), ARM64 (Raspberry Pi Zero 2 and 3+ **with 64 bits OS**).
|
||||||
|
|
||||||
|
3. Give execution permissions: `chmod +x hathoris-linux-armv7`
|
||||||
|
|
||||||
|
4. (optional) [Prepare a configuration for optional virtual inputs](#audio-sources) (like radios, streaming sources)
|
||||||
|
|
||||||
|
The file is called `settings.json`, it is expected to be in the directory where you execute `hathoris`. It can be overwrited by adding a command line argument like `-settings-file /etc/hathoris/settings.json`.
|
||||||
|
|
||||||
|
5. Launch the binary: `./hathoris -bind :8080`
|
||||||
|
|
||||||
|
6. The interface will be available on the port 8080 from anywhere on your local network.
|
||||||
|
|
||||||
|
From your local machine, it'll be on <http://localhost:8080/>
|
||||||
|
|
||||||
|
⚠️ Please note that if your host is directly reachable on the Internet, it will be accessible to anyone who can reach this port. It is recommended to use a reverse proxy and/or configure proper firewall rules to secure your setup.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
|
||||||
### Build the Project
|
### Build the Project
|
||||||
|
|
||||||
|
|
@ -242,6 +281,17 @@ curl http://127.0.0.1:8080/api/mixer'
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### With Kodi
|
||||||
|
|
||||||
|
An companion script is available to control hathoris directly from Kodi:
|
||||||
|
<https://git.nemunai.re/nemunaire/kodi.script.hathoris>
|
||||||
|
|
||||||
|
You can also create a script to automaticaly enable your Kodi input when it lauches.
|
||||||
|
Eg. for LibreELEC, append in `~/.config/autostart.sh`:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl 'http://192.168.0.42:8080/api/sources/spdif/enable' -X POST
|
||||||
|
```
|
||||||
|
|
||||||
## Compatible Hardware
|
## Compatible Hardware
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue