5 KiB
Rdio Scanner Docker Image
The Rdio Scanner Docker Image is the easiest installation method. The only prerequisite is that your host must have Docker installed before continuing.
1. Pull the docker image
Do docker pull chuot/rdio-scanner:latest like this:
$ docker pull chuot/rdio-scanner:latest
latest: Pulling from chuot/rdio-scanner
cbdbe7a5bc2a: Already exists
bd07af9ed1a4: Pull complete
3556ccf180b2: Pull complete
089d4748da74: Pull complete
d461af9c0a5f: Pull complete
b13fa0022c33: Pull complete
af86cf4eebc5: Pull complete
dbbf263c046e: Pull complete
adf8257900e9: Pull complete
9716c9a06d21: Pull complete
Digest: sha256:1264d0a9dc682e2057d7d6b89fee98164212fc0763ad3f40eb3193da75c64c75
Status: Downloaded newer image for chuot/rdio-scanner:latest
docker.io/chuot/rdio-scanner:latest
2. Database and configuration initialization
We now need to initialize the config.json file and the database. But first we need to determine where these files will be located on your host. We will use ~/.rdio-scanner in the following example, but you can choose any location you want. We will then pass this location via the --volume option.
$ mkdir ~/.rdio-scanner
$ docker run -it --rm --user $(id -u):$(id -g) --volume ~/.rdio-scanner:/app/data chuot/rdio-scanner:latest init
Configuration and database initialized
$ ls -l ~/.rdio-scanner
-rw-r--r--. 1 radio radio 8460 10 jui 08:32 config.json
-rw-r--r--. 1 radio radio 40960 10 jui 08:32 database.sqlite
3. Configure Rdio Scanner
The config.json is preloaded with 2 systems, which you probably don't want. They just serve as an example and can be replaced with new ones as desired.
Read the documentation docs/config.md for an explanation of all configurable parameters.
If your Rdio Scanner is already running, be sure to restart it every time you make changes to the config.json file.
$ docker restart rdio-scanner
rdio-scanner
4. Load a system from RadioReference.com (optional)
You may want to load your config.json with some systems from RadioReference.com.
First download the CSV file for all talkgroups from a trunked system. Then move this file to ~/.rdio-scanner. Here we will use the file trs_tg_7537.csv which corresponds to this system.
You can choose any system_id you want to refer to this system. If you choose an existing system_id in config.json, you will replace it with the new one.
$ mv ~/Downloads/trs_tg_7537.csv ~/.rdio-scanner
$ docker run -it --rm chuot/rdio-scanner:latest load-rrdb
USAGE: load-rrdb <system_id> <input_tg_csv>
$ docker run -it --rm --user $(id -u):$(id -g) --volume ~/.rdio-scanner:/app/data chuot/rdio-scanner:latest load-rrdb 11 trs_tg_7537.csv
File /app/data/trs_tg_7537.csv imported successfully into system 11
$ rm ~/.rdio-scanner/trs_tg_7537.csv
5. Start Rdio Scanner
By default, Rdio Scanner runs on port 3000. It is recommended to configure a SSL certificate and then to map port 3000 to port 443 using the --publish 3000:443 option.
However, we will stick to port 3000 in this example.
$ docker run --detach --name rdio-scanner --publish 3000:3000 --restart always --user $(id -u):$(id -g) --volume ~/.rdio-scanner:/app/data chuot/rdio-scanner:latest
520cdbf51fca11d8bacea12d81245f1cb4d984f80d2be2e3039727b59533a6a9
$ docker logs rdio-scanner
Server is running at http://0.0.0.0:3000
Generate new UUIDs for your config file (optional)
Even if your instance of Rdio Scanner is preconfigured with a new random UUID for your API keys, you may want to generate others. The following command will generate a new UUID which you can copy/paste into the config.json file.
$ docker run -it --rm chuot/rdio-scanner:latest random-uuid
aaf366c5-fa20-40a7-b617-dc7587c792fd
$ docker run -it --rm chuot/rdio-scanner:latest random-uuid 5
003c391c-610c-4900-b17f-80f6c9af2bbc
cd32028a-ca81-469c-90d5-8fd1bfb69228
df2f76b0-be15-44e9-848a-c9a71b092707
dc50e0d6-c635-436b-bb70-b46d99f12df9
74b602c0-b4ad-49a0-bb40-00008c31f9b2
Update Rdio Scanner
If a newer version of Rdio Scanner Docker Image is released, you can easily update it like this:
$ docker pull chuot/rdio-scanner:latest
...
$ docker restart rdio-scanner
rdio-scanner
Finally
Remember that Rdio Scanner must be supplied with audio files from a recorder. Either you mount another volume with the --volume /recordings:/home/radio/recordings options and use a dirWatch to monitor it, or you use the API with an upload script. See the examples folder for some examples.
Need help? Go to the Gitter Rdio Scanner Lobby.
Happy Rdio scanning !