More step by step instructions in README.md

This commit is contained in:
Chrystian Huot 2019-07-11 10:10:40 -04:00
parent 8b299ef5d5
commit daa6d2bb45
2 changed files with 101 additions and 4 deletions

View file

@ -41,20 +41,100 @@ The call search pane is opens by clicking the SEARCH CALL button of the main scr
Please follow the [Meteor Guide for Custom Deployment](https://guide.meteor.com/deployment.html#custom-deployment) instructions to have your own running installation.
Everything was built on a Fedora workstation and run in staging/production on a Debian server.
### Requirements for your development workstation
* Git
* Node.js
* Meteor
### Requirements for your staging/production server
* Apache Web Server (NGINX can also be used)
* Node.js
* MongoDB
### Development workstation quickstart
```bash
$ git clone https://github.com/chuot/rdio-scanner.git
$ cd rdio-scanner
$ npm i
$ npm start
```
You now have a running Rdio Scanner local instance running at `http://localhost:3000/` with a built-in MongoDB.
The runtime settings, like like those for the API upload key(s), are located in the `private/settings.json` folder.
If your Trunk Recorder instance is installed on an other server and you want to test your Rdio Scanner development instance, you can actually create a SSH tunnel to this server from your development workstation.
```bash
$ ssh -R 3000:localhost:3000 *your remote server*
```
Then use the upload scripts to upload on `http://localhost:3000/` from your Trunk Recorder server, as if an instance of Rdio Scanner was running on that same server.
### Build a staging/production package
Building a package is as simple as this, make sure you are in the Rdio Scanner git folder.
```bash
$ meteor build ../build
```
This will create a `rdio-scanner.tar.gz` file in `../build` that you will need to transfer to your staging/production server.
### Staging/production installation
Remember that your staging/production instance should(must) run behind a reverse proxy server. The examples folder contains files that will help you in this process.
#### examples/rdio-scanner.service
This is a systemd unit file that you willl need to copy (as root) to `/etc/systemd/system` and modify it according to your configuration. Runtime settings for Rdio Scanner are also included in this file. Make sure the API key(s) and the MongoDB url are correct.
Then activate it and start it.
```bash
$ sudo systemctl enable rdio-scanner
$ sudo systemctl start rdio-scanner
```
#### examples/htpasswd
This is an example of a `.htpasswd` file that you can use with an Apache Web Server to create a quick reverse proxy situation for your staging/production Rdio Scanner instance.
#### Unpack your Rdio Scanner package
Transfer the package on your server and unpack it somewhere. The example folder uses the `/home/radio/rdio-scanner` folder for it.
```bash
$ pwd
/home/radio/rdio-scanner
$ ls rdio-scanner.tar.gz
rdio-scanner.tar.gz
$ tar -xvzf rdio-scanner.tar.gz --strip-components 1
...
$ cd programs/server
$ npm i
$ sudo systemctl start rdio-scanner.service
```
## Trunk Recorder upload
### MP3 and JSON files
Refer to the examples folder for download scripts, etc. Attention, the first argument of the download scripts is the system number.
Refer to the examples folder for upload scripts, and so on. Be careful, the first argument of the upload scripts is the system number.
```bash
./upload.sh 2 /home/radio/trunk-recorder/audio_files/SERAM/2019/6/12/60067-1560345651_7.73431e+08.wav
$ ./upload.sh 2 /home/radio/trunk-recorder/audio_files/SERAM/2019/6/12/60067-1560345651_7.73431e+08.wav
```
### Talkgroups files
The main display information are obtained from the database. You must provision the database by uploading each CSV file to Rdio Scanner with the talkgroups script from the examples directory.
The main display information are obtained from the database. You must provision the database by uploading each CSV file to Rdio Scanner with the talkgroups script from the examples folder.
```bash
./upload.sh 2 /home/radio/trunk-recorder/SERAM.csv
$ ./upload.sh 2 /home/radio/trunk-recorder/SERAM.csv
```

17
examples/htaccess Normal file
View file

@ -0,0 +1,17 @@
#AuthType Basic
#AuthName "Rdio Scanner"
#AuthUserFile /var/www/vhosts/rdio-scanner.example.com/.htpasswd
#Require valid-user
RewriteEngine On
#RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} !^rdio-scanner.example.com$ [NC]
#RewriteRule ^/?(.*)$ https://rdio-scanner.example.com/$1 [L,R=301]
RewriteRule ^/?(.*)$ http://rdio-scanner.example.com/$1 [L,R=301]
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
RewriteRule ^/?(.*)$ ws://localhost:3000/$1 [P,L]
RewriteRule ^/?(.*)$ http://localhost:3000/$1 [P,L]