You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Setup.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -7,21 +7,20 @@
7
7
## Setup using Docker
8
8
The entire API is bundled in a [Docker Image](https://hub.docker.com/r/kimbtechnologies/radio_api).
9
9
10
-
1. Redirect the HTTP requests of the radio to your server (the *Radio-API*).
11
-
- This is done by altering the DNS queries.
12
-
- There is a [Docker Image](https://hub.docker.com/r/kimbtechnologies/radio_dns) which provides a DNS server altering all requests to `*.wifiradiofrontier.com`.
10
+
1. Redirect the HTTP requests of the radio to your server (running *Radio-API*).
11
+
- This is can be done by altering the DNS queries or other techniques depending on your network setup and router.
12
+
- In the end, the HTTP request of the radio to `*.wifiradiofrontier.com` need to be routed to *Radio-API*.
13
+
Besides the HTTP requests, the radio fetches the current time via NTP and expects an NTP server at `time.wifiradiofrontier.com`.
14
+
- The [Radio-DNS](https://hub.docker.com/r/kimbtechnologies/radio_dns) Docker Image is a an all-inclusive solution
15
+
- [Radio-DNS](https://hub.docker.com/r/kimbtechnologies/radio_dns) provides a DNS server altering requests for `*.wifiradiofrontier.com`.
13
16
- It has a feature to define an `ALLOWED_DOMAIN`, only requests from the corresponding IP address will be answered.
14
-
- Use a DynDNS hostname as your `ALLOWED_DOMAIN`.
15
-
- If hosted in the local network `ALLOWED_DOMAIN` can be `all`.
16
-
- *Not everybody has to setup a own DNS resolver, some routers provide such features.
17
-
The radio just has to send its HTTP request to the server where *Radio-API* (this repositories Docker Container) is running.*
18
-
- **Change the DNS server in the configuration of your radio to the IP of your DNS resolver.**
19
-
(This may be done via the web interface of the radio, accessible at the local IP address of the radio.)
17
+
Use a DynDNS hostname as your `ALLOWED_DOMAIN`. If hosted in the local network `ALLOWED_DOMAIN` can be `all`.
18
+
- **Change the DNS server in the configuration of your radio to the IP of your DNS resolver.**
19
+
(This may be done via the web interface of the radio, accessible at the local IP address of the radio.)
20
20
2. Run the Docker Container of *Radio-API*.
21
21
- See [docker-compose.yml](https://github.com/KIMB-technologies/Radio-API/blob/master/docker-compose.yml)
22
22
for Docker configuration and [below](#nginx-load-balancer) for reverse proxy setup.
23
-
- It is recommended to save the folder `/php-code/data/` als volume, because all stations and podcasts
24
-
are stored there.
23
+
- It is recommended to save the folder `/php-code/data/` als volume, because all stations and podcasts are stored there.
25
24
- Configure the image
26
25
- `CONF_DOMAIN` The domain where the system is hosted (will be reached via HTTP).
27
26
- `CONF_ALLOWED_DOMAIN` Like `ALLOWED_DOMAIN` in the DNS image, only requests from the corresponding IP address will be answered.
@@ -32,6 +31,7 @@ The entire API is bundled in a [Docker Image](https://hub.docker.com/r/kimbtechn
32
31
- `CONF_STREAM_JSON` Url to a JSON list of streams or `false` to disable (see [Own Streams](#own-streams))
33
32
- There are some more options, see defaults in [docker-compose.yml](https://github.com/KIMB-technologies/Radio-API/blob/master/docker-compose.yml).
34
33
- The default setup uses Redis for fast caching of values. Redis may be disable by setting `CONF_USE_JSON_CACHE=true`, which enables an json file based caching as fallback (cached items are then stored in `./data/cache`).
34
+
- Make sure, that *Radio-API* is available at port `80` for requests with the hostname `*.wifiradiofrontier.com` and `CONF_DOMAIN`.
35
35
- There are two ways to store which episodes of podcasts have already been listened to (new ones are marked by `*`)
36
36
- Create a cron job to `/cron.php`, e.g., `docker exec --user www-data radio_api php /cron.php`. (This will dump the already played episodes to a JSON file in `./data/` and *Radio-API* will load the file into redis on container startup).
37
37
- Use the data volume of Redis. (Redis will (re-)load its dump files on container startup.)
@@ -52,7 +52,7 @@ The image of [Radio DNS](https://hub.docker.com/r/kimbtechnologies/radio_dns) is
52
52
> We recommend the Docker-based setup as the manual setup might be a bit fiddly and is less tested.
53
53
> You are welcome to file bug reports as issues or open pull requests!
54
54
55
-
1. Redirect the HTTP request of the radio to your server (the*Radio-API*).
55
+
1. Redirect the HTTP request of the radio to your server (running*Radio-API*).
56
56
- This is the same as with the Docker based setup (see [here](#setup-using-docker)).
57
57
2. Run the *Radio-API* on your webserver.
58
58
- Preface:
@@ -80,7 +80,7 @@ The image of [Radio DNS](https://hub.docker.com/r/kimbtechnologies/radio_dns) is
80
80
- `CONF_LOG_DIR` (optional) Change the folder where log files are written to (defaults to `./data/`).
81
81
- `CONF_CACHE_DIR` (optional) Change the folder used by the file based cache (defaults to `./data/cache/`).
82
82
- `CONF_IM_EXPORT_TOKEN` (optional) Define a token for use with the Im- & Export web interface *Im- & Export* [↓](#im---export).
83
-
- `CONF_USE_LOGO_CACHE` (optional, default `false`) Cache logos of radio stations. This will make sure logos are served without https and convert svg file to png (assuming [`rsvg-convert`](https://pkgs.alpinelinux.org/package/v3.19/community/x86_64/rsvg-convert) is available on system). Logos are stored in `./media/`.
83
+
- `CONF_USE_LOGO_CACHE` (optional, default `false`) Cache logos of radio stations. This will make sure logos are served without https and convert svg files to png (assuming [`rsvg-convert`](https://pkgs.alpinelinux.org/package/v3.19/community/x86_64/rsvg-convert) is available on system). Logos are stored in `./media/`.
84
84
- **Attention:** Optional parameters have a leading `____` in the default `env.json`, make sure to remove them.
85
85
- The `CONF_REDIS_*` values are ignored and `CONF_USE_JSON_CACHE` is always `true`.
86
86
- Make sure, that *Radio-API* is available at port `80` for requests with the hostname `*.wifiradiofrontier.com` and `CONF_DOMAIN`.
@@ -159,9 +159,9 @@ This files contains for each radio the list of radio stations, podcasts, station
159
159
It also contains the list for assigning GUI-Codes to radios and the configuration file used in non-Docker mode.
160
160
161
161
Such an export JSON file can be imported to Radio-API afterwards.
162
-
Thereby, all data can be replaces, appended or only the data for one radio might be overwritten.
162
+
Thereby, all data can be replaced, appended, or only the data for one radio might be overwritten.
163
163
(The configuration file used in non-Docker mode will not be imported.)
164
-
More information is available at the Im- & Export web interface.
164
+
More information is available at the Im- & Export web interface.
165
165
166
166
### Nginx Load Balancer
167
167
An example file to use *Radio-API* behind a nginx load balancer as reverse proxy.
0 commit comments