Closed lokapal closed 11 months ago
Oh, I understand the problem with the disks of the hardware.
Would it be an idea to create a symlink for the ./data
or ./data/cache
folder to some other disk/ location? For Radio-API all would look the same and the operating system would save the files in the right place.
A user changing ./data/
to a ramdisk will need a custom „backup strategy“ and if a custom strategy is needed, a custom symlink should not be problematic. (At least I guess.)
I have a litte headache about storing the main config, podcast, and radio list files from ./data
somewhere else (they are written on change in the web interface and when a new radio connects).
Two logfiles are also created in ./data
, they can be moved somewhere else.
A configuration value to change the cache directory to a different value than ./data/cache
seems less problematic to me, too. However, the cache contains the list of last radio stations used with RadioBrowser and the list to highlight new episodes of podcasts (but these lists can be exported for backup reasons, as it is done with Docker and Redis).
As far as I know a default PHP installation is enough and no special extensions are needed. For EndURL the cURL extension is needed, but EndURL is only used if it is enabled in the web interface for a podcast. (mbstring and simplexml are used too, but as far as I understand they are somewhat default.)
Regarding the proxy, there might be a small misunderstanding:
The built in proxy is only used to translate audio streams from HTTPS to HTTP because the radio is not capable of SSL. It will only be used for station/ podcasts where it is activated in the web interface. If no station or podcast uses it, it won’t be used.
Replacing this proxy with a different one will be quite difficult and needs to be implemented for each software. I just looked at HAproxy, which does not seem to have the required feature called X-Sendfile or X-Accel.
But generally:
A webserver providing PHP (like Apache, NGINX+PHP-FPM, or similar) is not part of the non Docker version of Radio-API and needs to be provided by each user for running Radio-API (like any „normal“ PHP applications).
I created the config values to change the logdir and cache dir in a new branch more-configs. There I updated the Setup.md.
I also added a ./utils/backup-restore.php
script to manually export all relevant data from the cache.
The folder ./data
still contains config, list of radio stations, list of podcasts, and the list of known radios.
I released v2.7.1 with config values to change the log dir and cache dir.
Thanks a lot for SUCH fast changes, but some more are required: the standalone version required to obtain possibility to store config, saved station list and so on to the user-configured directories. I can explain: there are a lot devices that are run at not-so-much-enduring storage. It means that Raspberries and other similar SBCs very frequently have SDcard as filesystem storage. Or eMMC, or norFlash, or even USB flash. In any case the maximum number of writes for the each flash memory cell is VERY limited, so all current writings have to be made to /var/... or to /tmp... (it depends upon system architecture, for OpenWRT both /tmp and /var are mapped to the RAMdrive). So current station list and, especially, cache, should go to user-configured directory, or at least to something like /var/RadioAPI rather than ./data. From the other point of view, configuration should be stored permanently, of course. May we have additionally the full list of php extensions that are required? And the last one (at least for now): we can use our own reverse proxies that seems suitable to us (e.g. haproxy for openwrt), how to switch off built-in php proxying feature?
Many thanks in advance!