Skip to content

Commit

Permalink
Merge commit '0bd53a65a39e4190741810eade60cf29e89c4294' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
BusterNeece committed Jun 7, 2022
2 parents 9b76394 + 0bd53a6 commit 12a4451
Show file tree
Hide file tree
Showing 635 changed files with 116,474 additions and 89,462 deletions.
86 changes: 80 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,88 @@ release channel, you can take advantage of these new features and fixes.

## New Features/Changes

There have been no new features in the Rolling Release since the latest Stable release.
There have been no new features/changes since the last stable release.

## Code Quality/Technical Changes

There have been no technical changes in the Rolling Release since the latest Stable release.
There have been no code quality/technical changes since the last stable release.

## Bug Fixes

There have been no new bug fixes in the Rolling Release since the latest Stable release.
There have been no new bug fixes since the last stable release.

---

# AzuraCast 0.17.0 (Jun 6, 2022)

## New Features/Changes

- **HLS Support**: We now support the HTTP Live Streaming (HLS) format from directly within the AzuraCast web UI. Once
enabled, you can configure the various bitrates and formats of your HLS stream the same way you would configure mount
points; unlike mount points, however, your connecting listeners will automatically pick the one that suits their
bandwidth the best. While this technology was originally developed for Apple devices, it has seen widespread adoption
elsewhere. Note that because of how HLS is delivered, we cannot currently retrieve listener statistics for these
streams.

- **Integrated Stereo Tool Support**: We now support the popular premium sound processing tool, Stereo Tool. Because the
software is proprietary, you must first upload a copy of it via the System Administration page; you can then configure
Stereo Tool on a per-station level, including uploading your own custom `.sts` configuration file.

- **Bulk Media CSV Import/Export**: You can now export all of your station's media and its associated metadata into a
CSV file for editing in spreadsheet software of your choice. Once you've made your changes, upload the modified file
from the same page and all of the changes will be applied in bulk, including basic metadata, associated playlists,
cue/fade points, and custom fields.

- We have updated AzuraCast's AutoDJ scheduler to be able to handle the "Advanced" playlist configuration options
itself, notably including the "Interrupt Other Tracks" setting. This means that enabling these settings will no longer
force a playlist to use Liquidsoap for its scheduling.

- If the "Enforce Schedule" setting is enabled for a streamer and they overrun their scheduled time slot, the system
will automatically disconnect the listener and prevent them from reconnecting for a time period (configurable via the
station profile). THis can help prevent DJs from accidentally leaving their stream online and broadcasting "dead air".

- Streamers/DJs can have custom artwork uploaded for each streamer; during the streamer's broadcasts, if no other album
art is available, the streamer's artwork will appear as the cover art instead.

- You can now customize the compression used for automatic backups.

## Code Quality/Technical Changes

- We can now write custom Nginx configuration on a per-station basis and automatically reload it on-the-fly without
losing any active connections. This allows us to replace our standard `/radio/8000` web proxy URLs with
station-specific `/listen/station_name` ones, among other improvements.

- Since AzuraCast's services are all now accessible via `localhost`, several connections have been switched from TCP/IP
to using Unix domain socket files. This not only reduces the number of used ports but improves performance.

- Internal services using ports from 9000-9010 have been moved to use other ports or sockets; while our default port
allocation does not use these ports, many stations need to use ports in that range for legacy purposes, which should
once again be possible.

- Docker users can now debug Slim Application Errors by editing the `SHOW_DETAILED_ERRORS` in the `azuracast.env` file,
reports should be submitted to our [issues](https://github.com/azuracast/azuracast/issues) section for review by our
team.

- SFTP support is now enabled for Ansible users as well.

## Bug Fixes

- Playlists powered by remote stream URLs will once again work as expected. Note that these playlist types _must_ be
scheduled, as otherwise their indefinite duration will cause problems with radio operation.

- Remote URL playlists will now also support HLS (.m3u8) URLs.

- A bug preventing SFTP from properly supporting SSH public keys has been fixed.

- A minor security issue where SFTP would not properly disable if a station switched storage locations to a non-local
one has been resolved.

- The library used to handle translations for the PHP side of the application has been switched, which should avoid many
of the errors being seen by users not able to see translations in some sections of the site.

- When searching for items in searchable tables, the page will correctly reset to page 1.

- "Schedule View" now properly shows events that start on Saturday and roll over into Sunday.

---

Expand Down Expand Up @@ -147,9 +220,10 @@ There have been no new bug fixes in the Rolling Release since the latest Stable
incorporated several soft-reload improvements that allow us to rebuild configuration files without disconnecting
listeners. Both the "Restart to Apply Changes" and the "Restart System Broadcasting" link inside the 'Utilities'
submenu will now soft-reload, which will not disconnect listeners on Icecast.

- **Blocking User Agents**: Station owners can now block specific user agents (or user-agent patterns, with wildcards)
from connecting to their streams. This will prevent bots or malicious users from consuming excess bandwidth and appearing
from connecting to their streams. This will prevent bots or malicious users from consuming excess bandwidth and
appearing
in system-wide reports.

## Code Quality/Technical Changes
Expand All @@ -163,7 +237,7 @@ There have been no new bug fixes in the Rolling Release since the latest Stable
- We have updated how we handle Listener Reports to significantly reduce both memory and overall processing times,
meaning stations with large listener counts can now more easily view and export reports for long time periods.

- Updated to Liquidsoap version 2.0.3 on Ansible and Docker, this change includes some stability fixes and a patch for a
- Updated to Liquidsoap version 2.0.3 on Ansible and Docker, this change includes some stability fixes and a patch for a
memory leak within Liquidsoap version 2.0.2. We are still working on resolving some minor issues with it. Refer to our
megathread for more information [#5017](https://github.com/AzuraCast/AzuraCast/issues/5017)

Expand Down
29 changes: 19 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
#
FROM ghcr.io/azuracast/icecast-kh-ac:2.4.0-kh15-ac2 AS icecast

#
# MariaDB stage (for later copy)
#
FROM mariadb:10.7-focal AS mariadb

#
# Golang dependencies build step
#
Expand All @@ -16,7 +21,7 @@ RUN go install github.com/jwilder/dockerize@latest
#
# Final build image
#
FROM mariadb:10.7-focal
FROM ubuntu:focal

ENV TZ="UTC"

Expand All @@ -27,38 +32,41 @@ COPY --from=dockerize /go/bin/dockerize /usr/local/bin
COPY --from=icecast /usr/local/bin/icecast /usr/local/bin/icecast
COPY --from=icecast /usr/local/share/icecast /usr/local/share/icecast

# Import MariaDB scripts.
COPY --from=mariadb /usr/local/bin/healthcheck.sh /usr/local/bin/db_healthcheck.sh
COPY --from=mariadb /usr/local/bin/docker-entrypoint.sh /usr/local/bin/db_entrypoint.sh

# Run base build process
COPY ./util/docker/common /bd_build/
RUN chmod a+x /bd_build/*.sh \
&& /bd_build/prepare.sh \
&& /bd_build/add_user.sh \
&& /bd_build/cleanup.sh
&& /bd_build/cleanup.sh \
&& rm -rf /bd_build

# Build each set of dependencies in their own step for cacheability.
ARG ARM_FULL_BUILD

COPY ./util/docker/supervisor /bd_build/supervisor/
RUN bash /bd_build/supervisor/setup.sh \
&& rm -rf /bd_build/supervisor

COPY ./util/docker/stations /bd_build/stations/
RUN bash /bd_build/stations/setup.sh \
&& bash /bd_build/cleanup.sh \
&& rm -rf /bd_build/stations

COPY ./util/docker/web /bd_build/web/
RUN bash /bd_build/web/setup.sh \
&& bash /bd_build/cleanup.sh \
&& rm -rf /bd_build/web

COPY ./util/docker/mariadb /bd_build/mariadb/
RUN bash /bd_build/mariadb/setup.sh \
&& bash /bd_build/cleanup.sh \
&& rm -rf /bd_build/mariadb

COPY ./util/docker/redis /bd_build/redis/
RUN bash /bd_build/redis/setup.sh \
&& bash /bd_build/cleanup.sh \
&& rm -rf /bd_build/redis

RUN bash /bd_build/post_setup.sh \
&& rm -rf /bd_build

#
# START Operations as `azuracast` user
#
Expand Down Expand Up @@ -93,6 +101,7 @@ EXPOSE 8000-8999
ENV LANG="en_US.UTF-8" \
DOCKER_IS_STANDALONE="true" \
APPLICATION_ENV="production" \
MARIADB_AUTO_UPGRADE=1 \
MYSQL_HOST="localhost" \
MYSQL_PORT=3306 \
MYSQL_USER="azuracast" \
Expand All @@ -113,5 +122,5 @@ ENV LANG="en_US.UTF-8" \
PROFILING_EXTENSION_HTTP_IP_WHITELIST=*

# Entrypoint and default command
ENTRYPOINT ["/usr/local/bin/my_init"]
ENTRYPOINT ["tini", "--", "/usr/local/bin/my_init"]
CMD ["--no-main-command"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Latest Stable Release](https://img.shields.io/packagist/v/azuracast/azuracast.svg?label=latest+stable+version)]()
[![Apache 2.0 License](https://img.shields.io/github/license/azuracast/azuracast.svg)]()
[![Ethical Open Source](https://img.shields.io/badge/open-ethical-%234baaaa)](https://ethicalsource.dev/definition/)
[![Docker Pulls](https://img.shields.io/docker/pulls/azuracast/azuracast_radio.svg)](https://hub.docker.com/r/azuracast/azuracast_radio/)
[![Docker Pulls](https://img.shields.io/docker/pulls/azuracast/azuracast_radio.svg)](https://hub.docker.com/r/azuracast/azuracast/)
[![Twitter Follow](https://img.shields.io/twitter/follow/azuracast.svg?style=social&label=Follow)](https://twitter.com/azuracast)

**AzuraCast** is a self-hosted, all-in-one web radio management suite. Using its easy installer and powerful but
Expand Down
7 changes: 7 additions & 0 deletions azuracast.sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ AUTO_ASSIGN_PORT_MIN=8000
# See AUTO_ASSIGN_PORT_MIN.
AUTO_ASSIGN_PORT_MAX=8499

# This allows you to debug Slim Application Errors you may encounter
# By default, this is disabled to prevent users from seeing privileged information
# Please report any Slim Application Error logs to the development team on GitHub
# Valid options: true, false
SHOW_DETAILED_ERRORS=false


#
# Database Configuration
# --
Expand Down
3 changes: 1 addition & 2 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ declare(strict_types=1);
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
ini_set('display_errors', '1');

$autoloader = require dirname(__DIR__) . '/vendor/autoload.php';
require dirname(__DIR__) . '/vendor/autoload.php';

$cli = App\AppFactory::createCli(
$autoloader,
[
App\Environment::BASE_DIR => dirname(__DIR__),
]
Expand Down
27 changes: 14 additions & 13 deletions bin/uptime_wait
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ class UptimeWait
protected function checkDatabase(): bool
{
try {
$defaultHost = $this->isStandalone() ? 'localhost' : 'mariadb';

$dbOptions = [
'host' => $_ENV['MYSQL_HOST'] ?? $defaultHost,
'host' => $_ENV['MYSQL_HOST'] ?? 'localhost',
'port' => (int)($_ENV['MYSQL_PORT'] ?? 3306),
'dbname' => $_ENV['MYSQL_DATABASE'] ?? 'azuracast',
'user' => $_ENV['MYSQL_USER'] ?? 'azuracast',
'password' => $_ENV['MYSQL_PASSWORD'] ?? 'azur4c457',
];

$dsn = 'mysql:host=' . $dbOptions['host'] . ';port=' . $dbOptions['port']
$dsn = ('localhost' === $dbOptions['host'])
? 'mysql:unix_socket=/run/mysqld/mysqld.sock;dbname=' . $dbOptions['dbname']
: 'mysql:host=' . $dbOptions['host'] . ';port=' . $dbOptions['port']
. ';dbname=' . $dbOptions['dbname'];

$dbh = new PDO($dsn, $dbOptions['user'], $dbOptions['password']);
Expand All @@ -121,21 +121,27 @@ class UptimeWait

protected function checkRedis(): bool
{
$defaultHost = $this->isStandalone() ? 'localhost' : 'redis';

$enableRedis = $this->envToBool($_ENV['ENABLE_REDIS'] ?? true);
$redisHost = $_ENV['REDIS_HOST'] ?? $defaultHost;
$redisHost = $_ENV['REDIS_HOST'] ?? 'localhost';
$redisPort = (int)($_ENV['REDIS_PORT'] ?? 6379);
$redisDb = (int)($_ENV['REDIS_DB'] ?? 1);

$redisSocket = ('localhost' === $redisHost)
? '/run/redis/redis.sock'
: null;

if (!$enableRedis) {
$this->println('Redis disabled; skipping Redis check...');
return true;
}

try {
$redis = new Redis();
$redis->connect($redisHost, $redisPort, 15);
if (null !== $redisSocket) {
$redis->connect($redisSocket);
} else {
$redis->connect($redisHost, $redisPort, 15);
}
$redis->select($redisDb);

$redis->ping();
Expand All @@ -161,11 +167,6 @@ class UptimeWait
|| '1' === $value;
}

protected function isStandalone(): bool
{
return $this->envToBool($_ENV['DOCKER_IS_STANDALONE'] ?? false);
}

protected function println(string $line): void
{
echo $line . "\n";
Expand Down
15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
"require": {
"php": "^8.1",
"ext-PDO": "*",
"ext-curl": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-maxminddb": "*",
"ext-mbstring": "*",
"ext-redis": "*",
Expand All @@ -27,7 +29,6 @@
"azuracast/doctrine-batch-utilities": "dev-main",
"azuracast/doctrine-entity-normalizer": "dev-main",
"azuracast/flysystem-v2-extensions": "dev-main",
"azuracast/metadata-manager": "dev-main",
"azuracast/nowplaying": "dev-main",
"azuracast/slim-callable-eventdispatcher": "dev-main",
"bacon/bacon-qr-code": "^2.0",
Expand All @@ -42,11 +43,10 @@
"dragonmantank/cron-expression": "^3.1",
"gettext/gettext": "^5",
"gettext/php-scanner": "^1.3",
"gettext/translator": "^1.1",
"guzzlehttp/guzzle": "^7.0",
"guzzlehttp/oauth-subscriber": "^0.6.0",
"http-interop/http-factory-guzzle": "^1.0",
"intervention/image": "^2.6",
"james-heinrich/getid3": "v2.0.0-beta4",
"league/csv": "^9.6",
"league/flysystem-aws-s3-v3": "^3.0",
"league/flysystem-sftp-v3": "^3.0",
Expand All @@ -57,13 +57,15 @@
"matomo/device-detector": "^6",
"mezzio/mezzio-session": "^1.3",
"mezzio/mezzio-session-cache": "^1.7",
"monolog/monolog": "^2",
"monolog/monolog": "^3",
"myclabs/deep-copy": "^1.10",
"nesbot/carbon": "^2.36",
"pagerfanta/doctrine-collections-adapter": "^3",
"pagerfanta/doctrine-orm-adapter": "^3",
"php-di/php-di": "^6.0",
"php-di/slim-bridge": "^3.0",
"php-di/php-di": "v7.x-dev",
"php-ffmpeg/php-ffmpeg": "^1.0",
"phpmyadmin/motranslator": "^5.3",
"phpseclib/phpseclib": "^3.0",
"psr/http-factory": ">1",
"psr/simple-cache": ">1",
"ramsey/uuid": "^4.0",
Expand Down Expand Up @@ -92,6 +94,7 @@
"symfony/yaml": "^6",
"theiconic/php-ga-measurement-protocol": "^2.9",
"vlucas/phpdotenv": "^5.3",
"voku/portable-utf8": "^6.0",
"wikimedia/composer-merge-plugin": "dev-master",
"zircote/swagger-php": "^4.3.0"
},
Expand Down

0 comments on commit 12a4451

Please sign in to comment.