update readme
This commit is contained in:
60
README.md
60
README.md
@@ -30,7 +30,9 @@
|
|||||||
the default login is **admin**/**admin**.
|
the default login is **admin**/**admin**.
|
||||||
password can then be changed from the web interface
|
password can then be changed from the web interface
|
||||||
|
|
||||||
```
|
### ...from source
|
||||||
|
|
||||||
|
```bash
|
||||||
$ apt install build-essential git sqlite libtag1-dev ffmpeg libasound-dev # for debian like
|
$ apt install build-essential git sqlite libtag1-dev ffmpeg libasound-dev # for debian like
|
||||||
$ pacman -S base-devel git sqlite taglib ffmpeg alsa-lib # for arch like
|
$ pacman -S base-devel git sqlite taglib ffmpeg alsa-lib # for arch like
|
||||||
$ go get go.senan.xyz/gonic/cmd/gonic
|
$ go get go.senan.xyz/gonic/cmd/gonic
|
||||||
@@ -39,10 +41,11 @@ $ gonic -h # or see "configuration options below"
|
|||||||
```
|
```
|
||||||
|
|
||||||
**note:** unfortunately if you do this above, you'll be compiling gonic locally on your machine
|
**note:** unfortunately if you do this above, you'll be compiling gonic locally on your machine
|
||||||
(if someone knows how I can statically link sqlite3 and taglib, please let me know so I can distribute static binaries)
|
(if someone knows how I can statically link sqlite3 and taglib, please let me know so I can distribute static binaries)
|
||||||
|
|
||||||
or else you can run in docker, available on dockerhub as [sentriz/gonic](https://hub.docker.com/r/sentriz/gonic)
|
### ...with docker `x86_64`
|
||||||
(for an ARM / raspberrypi image, please see [ugeek/gonic](https://hub.docker.com/r/ugeek/gonic))
|
|
||||||
|
the image is available on dockerhub as [sentriz/gonic](https://hub.docker.com/r/sentriz/gonic)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# example docker-compose.yml
|
# example docker-compose.yml
|
||||||
@@ -70,50 +73,53 @@ services:
|
|||||||
|
|
||||||
then start with `docker-compose up -d`
|
then start with `docker-compose up -d`
|
||||||
|
|
||||||
**Installation with systemd** (on ubuntu 18.04)
|
### ...with docker `arm / raspberry pi`
|
||||||
|
|
||||||
Prerequisites:
|
please see [ugeek/gonic](https://hub.docker.com/r/ugeek/gonic)
|
||||||
|
|
||||||
|
### ...with systemd
|
||||||
|
|
||||||
|
example by @IUCCA, tested on Ubuntu 18.04
|
||||||
|
|
||||||
|
1. add a repository with the latest Version of golang and install the prerequisites
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
Add a repository with the latest Version of golang and install the prerequisites:
|
$ sudo add-apt-repository ppa:longsleep/golang-backports
|
||||||
sudo add-apt-repository ppa:longsleep/golang-backports
|
$ sudo apt update && sudo apt upgrade
|
||||||
sudo apt update && sudo apt upgrade
|
$ sudo apt install build-essential git sqlite libtag1-dev ffmpeg libasound-dev golang
|
||||||
sudo apt install build-essential git sqlite libtag1-dev ffmpeg libasound-dev golang
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Download and compile gonic in the home directory
|
2. download and compile gonic in the home directory
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go get go.senan.xyz/gonic/cmd/gonic
|
$ go get go.senan.xyz/gonic/cmd/gonic
|
||||||
```
|
```
|
||||||
|
|
||||||
Add a gonic user and create a directory for the server:
|
3. add a gonic user and create a directory for the server
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo mkdir -p /var/gonic/
|
$ sudo mkdir -p /var/gonic/
|
||||||
sudo adduser --disabled-login --gecos "" gonic
|
$ sudo adduser --disabled-login --gecos "" gonic
|
||||||
sudo mv go/bin/gonic /var/gonic/
|
$ sudo mv go/bin/gonic /var/gonic/
|
||||||
sudo wget https://raw.githubusercontent.com/sentriz/gonic/master/contrib/config -O /var/gonic/config
|
$ sudo wget https://raw.githubusercontent.com/sentriz/gonic/master/contrib/config -O /var/gonic/config
|
||||||
sudo chmod -R 750 /var/gonic/
|
$ sudo chmod -R 750 /var/gonic/
|
||||||
sudo chown -R gonic:gonic /var/gonic/
|
$ sudo chown -R gonic:gonic /var/gonic/
|
||||||
```
|
```
|
||||||
|
|
||||||
Add your music-path to the config file
|
4. add your `music-path` to the config file
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nano /var/gonic/config
|
$ sudo nano /var/gonic/config
|
||||||
```
|
```
|
||||||
|
|
||||||
Setup systemd service:
|
5. setup systemd service
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo wget https://raw.githubusercontent.com/sentriz/gonic/master/contrib/gonic.service -O /etc/systemd/system/gonic.service
|
$ sudo wget https://raw.githubusercontent.com/sentriz/gonic/master/contrib/gonic.service -O /etc/systemd/system/gonic.service
|
||||||
sudo systemctl daemon-reload
|
$ sudo systemctl daemon-reload
|
||||||
sudo systemctl enable --now gonic
|
$ sudo systemctl enable --now gonic
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## configuration options
|
## configuration options
|
||||||
|
|
||||||
|env var|command line arg|description|
|
|env var|command line arg|description|
|
||||||
|
|||||||
Reference in New Issue
Block a user