Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AzuraCast #479

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added templates/azuracast/assets/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added templates/azuracast/assets/screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions templates/azuracast/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import { Output, Services, randomPassword } from "~templates-utils";
import { Input } from "./meta";

export function generate(input: Input): Output {
const services: Services = [];

const protectedPorts = [
3306, // MariaDB
6010, // Nginx internal
6379, // Redis
8080, // Common debug port
80, // HTTP
443, // HTTPS
2022, // SFTP
];

const ports = [
{
published: input.appSftpPort,
target: input.appSftpPort
}
];

for(let i = input.appMinimumStationPort; i < input.appMaximumStationPort; i += 10) {
if (protectedPorts.includes(i)) {
continue;
}

ports.push({
published: i,
target: i
});
ports.push({
published: i+5,
target: i+5
});
ports.push({
published: i+6,
target: i+6
});
}

const databasePassword = randomPassword();

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appServiceName,
env: [
`AZURACAST_HTTP_PORT=${input.appHttpPort}`,
`AZURACAST_HTTPS_PORT=${input.appHttpsPort}`,
`AZURACAST_SFTP_PORT=${input.appSftpPort}`,
`MYSQL_ROOT_PASSWORD=${databasePassword}`,
`AUTO_ASSIGN_PORT_MIN=${input.appMinimumStationPort}`,
`AUTO_ASSIGN_PORT_MAX=${input.appMaximumStationPort}`
].join("\n"),
source: { type: "image", image: "ghcr.io/azuracast/azuracast:"+input.appServiceVersion },
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
port: input.appHttpPort,
https: false
},
{
host: "$(EASYPANEL_DOMAIN)",
port: input.appHttpsPort,
https: true
},
],
ports: ports,
mounts: [
{
type: "volume",
name: "station_data",
mountPath: "/var/azuracast/stations",
},
{
type: "volume",
name: "backups",
mountPath: "/var/azuracast/backups",
},
{
type: "volume",
name: "db_data",
mountPath: "/var/lib/mysql",
},
{
type: "volume",
name: "storage",
mountPath: "/var/azuracast/storage",
}
],
},
});

return { services };
}
88 changes: 88 additions & 0 deletions templates/azuracast/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: AzuraCast
description: AzuraCast is a self-hosted, all-in-one web radio management suite. Using its easy installer
and powerful but intuitive web interface, you can start up a fully working web radio station in a few
quick minutes.

AzuraCast works for web radio stations of all types and sizes, and is built to run on even the most
affordable VPS web hosts.
instructions: Once installation is complete, you must complete setup by visiting the new installation
in your browser. Some credentials (like the MySQL root password) are automatically generated upon
installation you can access them by viewing the app configuration on the host machine.
changeLog:
- date: 2024-01-05
description: Template created (v0.19.4)
links:
- label: Website
url: https://azuracast.com
- label: Github
url: https://github.com/azuracast/azuracast
contributors:
- name: Buster Neece
url: https://github.com/BusterNeece
schema:
type: object
required:
- projectName
- appServiceName
- appServiceVersion
- appHttpPort
- appHttpsPort
- appSftpPort
- appMinimumStationPort
- appMaximumStationPort
properties:
projectName:
type: string
title: Project Name
appServiceName:
type: string
title: App Service Name
default: azuracast
appServiceVersion:
type: string
title: Release Channel ("stable", "rolling", or a specific version)
default: stable
appHttpPort:
type: number
title: HTTP Port
default: 80
appHttpsPort:
type: number
title: HTTPS Port
default: 443
appSftpPort:
type: number
title: SFTP Port
default: 2022
appMinimumStationPort:
type: number
title: Station Auto-assigned Port Range Minimum
default: 8000
appMaximumStationPort:
type: number
title: Station Auto-assigned Port Range Maximum
default: 8500
benefits:
- title: Everything's Included
description: AzuraCast installs everything you need to get a web radio station
up and running in minutes.
- title: Powerful and Intuitive
description: Manage every aspect of your radio station via a simple yet
powerful web interface.
- title: Runs Anywhere
description: Install AzuraCast onto any server (or desktop) that supports Docker.
features:
- title: Web-Based Station Management
description: Upload media, manage playlists, create local mount points and remote
relays, view analytics and reports and much more, all from the convenience of
your web browser.
- title: Multi-Station Administration
description: Host multiple stations on a single installation, create new user
accounts and unique roles with granular permissions. Back up your installation
and keep track of every station from one central location.
- title: Built-in Public Pages
description: Out of the box, each station includes a public-facing player page
that can also be embedded into your own web site. Our powerful APIs let you build
your own players and interfaces that take advantage of our rich metadata support.
tags:
- Media