diff --git a/.drone.yml b/.drone.yml index 19abf21..272d2ac 100644 --- a/.drone.yml +++ b/.drone.yml @@ -71,6 +71,19 @@ steps: event: - 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 image: plugins/docker:linux-arm settings: @@ -129,6 +142,18 @@ steps: 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: @@ -185,6 +210,18 @@ steps: 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: diff --git a/Dockerfile b/Dockerfile index 2456062..484a097 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,10 @@ RUN go get && go generate && go build -ldflags="-s -w" FROM alpine:3.18 +ENV HATHORIS_BIND=:8080 EXPOSE 8080 CMD ["/srv/hathoris"] +RUN apk --no-cache add alsa-utils pulseaudio-utils mpv yt-dlp + COPY --from=build /go/src/git.nemunai.re/nemunaire/hathoris/hathoris /srv/hathoris diff --git a/Dockerfile-norebuild b/Dockerfile-norebuild index e083f4f..cfa78e8 100644 --- a/Dockerfile-norebuild +++ b/Dockerfile-norebuild @@ -1,6 +1,9 @@ FROM alpine:3.18 +ENV HATHORIS_BIND=:8080 EXPOSE 8080 CMD ["/srv/hathoris"] +RUN apk --no-cache add alsa-utils pulseaudio-utils mpv yt-dlp + COPY hathoris /srv/hathoris diff --git a/README.md b/README.md index e3ba621..e955312 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,40 @@ Hathoris is compatible with any Linux distribution that has PulseAudio. It also ### Quick Installation Guide -TODO: Add a quick installation guide. +#### With Docker +``` +docker run -p 8080:8080 \ + --device /dev/snd \ + -e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \ + -v ${XDG_RUNTIME_DIR}/pulse/native:/run/pulse/native \ + -v ~/.config/pulse/cookie:/root/.config/pulse/cookie \ + nemunaire/hathoris +``` + +#### 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](/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 :8081` + +6. The interface will be available on the port 8081 from anywhere on your local network. + + From your local machine, it'll be on + +Enjoy! ### Build the Project