README.md 1.95 KB
Newer Older
Christian Pointner's avatar
Christian Pointner committed
1
2
# Import and Playlist Daemon

3
4
Tank implements an AURA import and playlist daemon.

Christian Pointner's avatar
Christian Pointner committed
5
## Quickstart
6
7
8
9
10
11
12

To install tank, use the `go get` command:

```sh
$ go get gitlab.servus.at/autoradio/tank/...
```

13
14
15
16
17
18
Create configuration file see:
  https://gitlab.servus.at/autoradio/tank/blob/master/cmd/tank/sample-cfg.yaml

Make sure that the directory pointed to by ```store.path``` exists and is writeable
for the user running the daemon

19
20
21
And then run the `tank` binary:

```sh
22
$ $GOPATH/bin/tank --config config.yaml run --listen localhost:8000
23
```
Christian Pointner's avatar
Christian Pointner committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

## 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.