Commit ad982336 authored by Christian Pointner's avatar Christian Pointner
Browse files

improved Readme

parent c142a82e
Pipeline #222 passed with stages
in 2 minutes and 17 seconds
......@@ -2,7 +2,7 @@
Tank implements an AURA import and playlist daemon.
## Getting Started
## Quickstart
To install tank, use the `go get` command:
......@@ -21,3 +21,79 @@ And then run the `tank` binary:
```sh
$ $GOPATH/bin/tank --config config.yaml run --listen localhost:8000
```
## Development
Check out the repository and build the daemon:
```sh
git clone gitlab.servus.at/autoradio/tank
cd tank
make
```
If you want to change the UI you need to regenerate the bindata assets and rebuild the daemon:
```sh
make ui
make
```
You may run the daemon using the following command:
```sh
./contrib/run.sh
```
This is using ```contrib/sample-cfg.yaml``` and depends on a mysql or postgres server
running on localhost. You may use the scripts inside ```contrib/``` to start docker
containers for this purpose.
### mysql
```sh
./contrib/mysql/run_server.sh
```
Wait for the server to boot up and then initialize the database using a second terminal:
```sh
./contrib/mysql/run_client.sh
```
Type the following on the mysql command line:
```mysql
source init.sql
```
This command can also be used to empty the database if you want to start with a new one.
Once you are done with the database you can stop the server using:
```sh
./contrib/postgres/stop_server.sh
```
### postgres
```sh
./contrib/postgres/run_server.sh
```
Wait for the server to boot up and then initialize the database using a second terminal:
```sh
./contrib/mysql/run_client.sh
```
Type the following on the mysql command line:
```sh
psql < init.sql
```
This command can also be used to empty the database if you want to start with a new one.
Once you are done with the database you can stop the server by pressing CTRl-C inside the
terminal of the server.
#!/bin/bash
BASE_D=$(realpath "${BASH_SOURCE%/*}/")
BASE_D=$(realpath "${BASH_SOURCE%/*}/..")
export AURA_TANK_DEBUG=1
export AURA_TANK_LISTEN=127.0.0.1:8080
mkdir -p /run/user/1000/aura-tank
"$BASE_D/tank" --config "$BASE_D/sample-cfg.yaml" run
"$BASE_D/tank" --config "$BASE_D/contrib/sample-cfg.yaml" run
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment