Move documentation back into the main repo.

This commit is contained in:
Buster "Silver Eagle" Neece 2018-10-19 21:47:22 -05:00
parent 4be3f8303e
commit 05f38ece1d
74 changed files with 7227 additions and 50 deletions

View File

@ -34,6 +34,8 @@ Contributions are also welcome in the supporting technologies used to make Azura
- [Ansible configuration](https://github.com/AzuraCast/AzuraCast/tree/master/util/ansible) for traditional installs and Docker installation/updates
- Python for our auxiliary [station monitoring scripts](https://github.com/AzuraCast/station-watcher-python)
Instructions for developing with AzuraCast locally are [available here](https://www.azuracast.com/developing.html).
If you have questions about the guidelines above or about how to contribute to AzuraCast, please create a Github issue and we will be happy to assist you.
## The "Do Nots" of Contributing
@ -49,4 +51,4 @@ While we appreciate everyone who is eager to contribute to this project and help
## Financial contributions
We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/azuracast).
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.

View File

@ -82,25 +82,6 @@ docker-compose run --rm cli azuracast_cli cache:clear
php /var/azuracast/www/util/cli.php cache:clear
```
### Change Port Mappings (Docker Installations)
If you're using AzuraCast alongside existing services that use the same ports, you may notice errors when attempting to start up Docker containers.
Since the entire Docker configuration is controlled by a single file, `docker-compose.yml` in the project root, you can easily make your own copy of this file, modify any necessary ports, and use your copy of the file to run AzuraCast instead:
- Copy `docker-compose.yml` from the AzuraCast project root to a location outside the project root. This ensures you won't lose your changes when updating AzuraCast itself.
- Make any needed customizations to the file. AzuraCast expects certain ports to be used, but you can forward these ports to different ones on the host by changing the first part of each `ports` item. For example, you can change `80:80` to `8080:80` to use port 8080 on the host without affecting the AzuraCast container itself. _(Note: In this case you should also remove port 8080 from the `stations` container's ports)._
- Update any items in the `volumes` section that refer to the relative path `.`, from their original setting:
```
.:/var/azuracast/www
```
To their new path relative to your custom `docker-compose.yml` file:
```
/path/to/azuracast/on/host:/var/azuracast/www
```
**Important note:** If an AzuraCast update changes the services used in the `docker-compose.yml` file, you will need to also update your custom version of the file with the changes. These changes are infrequent compared to other sections of the code, however.
### Access Files via SFTP (Docker Installations)
By default, SFTP access isn't set up for Docker based installations. If you have a large volume of media files, you may
@ -146,38 +127,29 @@ isn't within the default range AzuraCast serves (8000-8999).
#### Docker
The way ports map from Docker containers to your outside server is controlled entirely by the `docker-compose.yml` file.
If you're using AzuraCast alongside existing services that use the same ports, you may notice errors when attempting to start up Docker containers.
In the Docker Compose style, ports are listed as `outside-ip:outside-port:inside-port`. If the outside IP address isn't
specified, it listens on all IPs, and if only one port is specified, it maps the same port both inside and outside the
container.
The Docker configuration, including the ports that are exposed to the Internet, is controlled by a single file, `docker-compose.yml`. Your copy of this file can be modified as needed.
To edit the ports the AzuraCast web application uses, open your local `docker-compose.yml` and find the `nginx` service.
You'll see the following two lines in the `ports` section:
The ports you will most often want to change are the ports for the web service. In `docker-compose.yml`, these ports are listed under the `nginx` service:
```yaml
version: '2.2'
services:
# web,...
nginx:
image: azuracast/azuracast_nginx:latest
ports:
- '80:80'
- '443:443'
```
To change the port, only modify the first number in the pair. For example, to route HTTP traffic to port 7000, this line
should read ` - '7000:80'`. To change where HTTPS traffic routes, update the line for port 443.
The first part of each port mapping, before the colon character (:), is the port that will be exposed to the public. You should _only_ change this number, not the number after the colon.
When using non-standard radio station ports, you have a number of options available to you:
For example, to serve pages via port 8080, the ports entry would be: ` - '8080:80'`.
- If you're only broadcasting and not accepting streamers or DJs, you can rely on the web proxy feature built in to
AzuraCast, which will route your radio traffic through the main web site's port. This feature can be enabled from the
`Site Settings` page.
- You can add just the ports you want to use to the `docker-compose.yml` file. In this file, under the `stations` service,
you will find a `ports` subsection with a large number of pre-forwarded ports. You can add to this list or replace it with
your own.
- You can forward the entire range of ports you intend to use using `docker-compose.yml`. Under the `stations` service
inside the `ports` subsection, you can replace this entire section with your own custom port range, i.e. ` - '9000-9500:9000-9500'`.
Note that due to the way Docker is configured, forwarding a port range this large will likely consume a high amount of memory,
so only use this option if necessary.
**Important note:** The Docker Utility Script (`docker.sh`) will ask you if you want to update your `docker-compose.yml` file when updating. Sometimes, there are new features that you should update the file to take advantage of. Be sure to recreate any changes you have made once the file is updated.
#### Traditional

View File

@ -139,14 +139,6 @@ services:
init: true
restart: always
# Developer Mode services
static:
build:
context: ./util/docker/static
volumes:
- ./web/static:/data
- static_node_modules:/data/node_modules
# chronograf:
# image: chronograf:alpine
# ports:
@ -176,4 +168,3 @@ volumes:
station_data: {}
shoutcast2_install: {}
tmp_data: {}
static_node_modules: {}

10
docker-compose.docs.yml Normal file
View File

@ -0,0 +1,10 @@
version: '2.2'
services:
docs:
build:
context: ./util/docker/docs
ports:
- '8080:8080'
volumes:
- ./docs:/data/docs

12
docker-compose.static.yml Normal file
View File

@ -0,0 +1,12 @@
version: '2.2'
services:
static:
build:
context: ./util/docker/static
volumes:
- ./web/static:/data
- static_node_modules:/data/node_modules
volumes:
static_node_modules: {}

39
docs/.vuepress/config.js Normal file
View File

@ -0,0 +1,39 @@
module.exports = {
title: 'AzuraCast',
description: 'Simple, Self-Hosted Web Radio',
dest: 'public',
ga: 'UA-120542341-1',
head: [
['link', { rel: 'icon', href: `/img/logo.png` }],
['meta', { name: 'theme-color', content: '#2196F3' }],
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
['link', { rel: 'apple-touch-icon', href: `/icons/apple-icon-152x152.png` }],
['meta', { name: 'msapplication-TileImage', content: '/icons/ms-icon-144x144.png' }],
['meta', { name: 'msapplication-TileColor', content: '#2196F3' }]
],
themeConfig: {
repo: 'azuracast/azuracast',
nav: [
{ text: 'Home', link: '/' },
{ text: 'About', link: '/about' },
{ text: 'Install', link: '/install' },
{ text: 'Donate', link: '/donate' }
],
docsRepo: 'https://gitlab.com/azuracast/azuracast.com',
docsDir: 'docs',
docsBranch: 'master',
sidebar: [
'/about',
'/screenshots',
'/demo',
'/install',
'/api',
'/cli',
'/docker_sh',
'/mascot',
'/developing',
'/donate'
]
}
}

View File

@ -0,0 +1,9 @@
$accentColor = #2196F3
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34
div.theme-container.no-sidebar {
background: url('/img/hexbg.png') top center no-repeat;
background-size: contain;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,60 @@
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
<style>
html
{
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after
{
box-sizing: inherit;
}
body
{
margin:0;
background: #fafafa;
}
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="./swagger-ui-bundle.js"> </script>
<script src="./swagger-ui-standalone-preset.js"> </script>
<script>
window.onload = function() {
// Build a system
const ui = SwaggerUIBundle({
url: "https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/web/static/api/openapi.yml",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
window.ui = ui
}
</script>
</body>
</html>

View File

@ -0,0 +1,67 @@
<!doctype html>
<html lang="en-US">
<body onload="run()">
</body>
</html>
<script>
'use strict';
function run () {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1);
} else {
qp = location.search.substring(1);
}
arr = qp.split("&")
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value)
}
) : {}
isValid = qp.state === sentState
if ((
oauth2.auth.schema.get("flow") === "accessCode"||
oauth2.auth.schema.get("flow") === "authorizationCode"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
});
}
if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: "+qp.error_uri : "");
}
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
}
window.close();
}
</script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"swagger-ui.css","sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,41 @@
{
"name": "App",
"icons": [
{
"src": "\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

14
docs/README.md Normal file
View File

@ -0,0 +1,14 @@
---
home: true
heroImage: img/logo.png
actionText: Get Started →
actionLink: /install
features:
- title: Everything's Included
details: AzuraCast installs everything you need to get a web radio station up and running in minutes.
- title: Powerful and Intuitive
details: Manage every aspect of your radio station via a simple yet powerful web interface.
- title: Runs Anywhere
details: Install AzuraCast directly onto any Ubuntu VPS, or run it on any server (or desktop) that supports Docker.
footer: Apache 2.0 License | Copyright © 2012-present Buster "Silver Eagle" Neece
---

61
docs/about.md Normal file
View File

@ -0,0 +1,61 @@
---
title: About AzuraCast
---
**AzuraCast** is a self-hosted, all-in-one web radio management kit. 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. The project is named after Azura Peavielle, the mascot of [its predecessor project](https://github.com/SlvrEagle23/Ponyville-Live). AzuraCast also has its own project mascot, [Azura Ruisselante](https://github.com/AzuraCast/AzuraCast/wiki/Meet-Azura-Ruisselante) created by the talented artist [Tyson Tan](https://tysontan.deviantart.com/).
**AzuraCast is currently in beta.** Many web radio stations already run AzuraCast, but keeping your server up-to-date with the latest code from the GitHub repository is strongly recommended for security, bug fixes and new feature releases. It's unlikely, but updates may result in unexpected issues or data loss, so always make sure to keep your station's media files backed up in a second location.
To install AzuraCast, you should have a basic understanding of the Linux shell terminal. Once installed, every aspect of your radio station can be managed via AzuraCast's simple to use web interface.
## Features
With AzuraCast, you can:
* **Manage your Media:** Upload songs from the web, organize music into folders, and preview songs in your browser.
* **Create Playlists:** Set up standard playlists that play all the time, scheduled playlists for time periods, or special playlists that play once per x songs, or once per x minutes.
* **Set Up Live DJs:** Enable or disable live broadcasting from streamers/DJs, and create individual accounts for each streamer to use.
* **Take Listener Requests:** Let your listeners request specific songs from your playlists, both via an API and a simple public-facing listener page.
* **Track Analytics and Reports:** Keep track of every aspect of your station's listeners over time. View reports of each song's impact on your listener count.
* **Let Station Autopilot Do the Work:** AzuraCast can automatically assign songs to a playlist based on the song's impact on listener numbers.
* **Delegate Management:** Create and remove separate administrator accounts for each station manager.
* **Build Your Own Radio Player:** AzuraCast's powerful, well-documented API lets you control your station from software built in any programming language.
* **Integrate with TuneIn, Discord and More:** The new web hook system lets you broadcast changes in your station to third party services.
* ...and more.
### What's Included
Whether you're using the traditional installer or Docker containers, AzuraCast will automatically retrieve and install these components for you:
#### Radio Software
* **[Liquidsoap](https://www.liquidsoap.info/)** as the always-playing "AutoDJ"
* **[Icecast 2.4](https://icecast.org/)** as a radio broadcasting frontend (Icecast-KH installed on supported platforms)
* **[SHOUTcast 2 DNAS](http://wiki.shoutcast.com/wiki/SHOUTcast_DNAS_Server_2)** as an alternative radio frontend (x86/x64 only)
#### Supporting Software
* **[NGINX](https://www.nginx.com)** for serving web pages and the radio proxy
* **[MariaDB](https://mariadb.org/)** as the primary database
* **[PHP 7.2](https://secure.php.net/)** powering the web application
* **[InfluxDB](https://www.influxdata.com/)** for time-series based statistics
* **[Redis](https://redis.io/)** for sessions, database and general caching
## License
AzuraCast is licensed under the [Apache license, version 2.0](https://github.com/AzuraCast/AzuraCast/blob/master/LICENSE.txt). This project is free and open-source software, and pull requests are always welcome.
## Questions? Comments? Feedback?
AzuraCast is a volunteer project, and we depend on your support and feedback to keep growing. Issues for this codebase are tracked using [GitHub Issues](https://github.com/AzuraCast/AzuraCast/issues/new). Anyone can create a new issue for the project, and if you have any problems with your installation or ideas for new features to add, you are encouraged to do so.
## Friends of AzuraCast
We would like to thank the following organizations for their support of AzuraCast's ongoing development:
- [DigitalOcean](https://m.do.co/c/21612b90440f) for generously providing the server resources we use for our demonstration instance, our staging and testing environments, and more
- [JetBrains](https://www.jetbrains.com/) for making our development faster, easier and more productive with tools like PhpStorm
- [CrowdIn](https://crowdin.com/) for giving us a simple and powerful tool to help translate our application for users around the world
- The creators and maintainers of the many free and open-source tools that AzuraCast is built on, who have done so much to help move FOSS forward

32
docs/api.md Normal file
View File

@ -0,0 +1,32 @@
---
title: API
---
Once installed and running, AzuraCast exposes an API that allows you to monitor and interact with your stations. You can perform the following functions and more from the JSON REST API:
- View now-playing data and recent song history for all stations
- View general station information
- Submit song requests (if allowed by the station)
- Start, stop and restart stations individually
## Per-Install API Documentation
Each AzuraCast installation includes documentation for the API at the exact version it's currently using. If you're interacting with an AzuraCast instance and you're not sure what API endpoints it exposes, you can visit `azuracast.site.name/api/` to view the installation-specific documentation.
## Latest Version
Documentation for the latest version of the API can be found [on the main AzuraCast site](http://azuracast.com/api/index.html).
## API Authentication
If you're accessing sensitive information or modifying the server, you will be required to authenticate your API requests with an authorization key.
You can create an API key from the AzuraCast web interface, by clicking the user menu in the top right and clicking "My API Keys". Any API keys you create will share the same permissions that you have as a user.
The preferred method of authenticating is to send the following header along with your API request:
```
Authorization: Bearer your_api_key_here
```
You can also include the API key in the `X-API-Key` header if desired.

108
docs/cli.md Normal file
View File

@ -0,0 +1,108 @@
---
title: Command-Line Interface
---
AzuraCast features a powerful Command-Line Interface (CLI) tool that allows you to perform maintenance and troubleshooting tasks "under the hood".
In order to use the AzuraCast CLI, you must have shell terminal access to the server running AzuraCast (to the host machine, if you're running Docker).
[[toc]]
## Invoking the CLI
**Using the Docker Utility Script:**
If you're using the Docker installation method, it's recommended to download the [Docker Utility Script](/docker_sh.html), which will allow you to use this shorter syntax:
```bash
./docker.sh cli [command]
```
**From a Docker Installation:**
```bash
docker-compose run --rm cli azuracast_cli [command]
```
**Traditional Installation:**
```bash
php /var/azuracast/www/util/cli.php [command]
```
## Command Reference
### List All Commands
To see all commands available, run the appropriate CLI command for your installation type with no command specified.
### Reset Administrator Password
```bash
(cli_command) azuracast:account:reset-password your@email.com
```
Generate a temporary password for the user account with the specified e-mail address. This can help you recover an account you have lost access to. This method is used for security purposes instead of a typical "Forgot Password?" prompt on the login screen.
### Manually Reprocess All Media
```bash
(cli_command) azuracast:media:reprocess
```
Iterates through all stations' media directories and manually reloads the metadata information stored inside AzuraCast with the latest data on the files themselves. This is useful for troubleshooting songs that are stuck in "Processing" status, or if you have recently uploaded multiple songs via SFTP.
### Manually Run AzuraCast Setup
```bash
(cli_command) azuracast:setup [--update]
```
Runs any necessary database updates to bring your AzuraCast installation to the latest version. This is normally run automatically as part of the installation and update processes, but can be run manually for troubleshooting or local development.
::: warning
Running this command will disconnect all current active listeners to your radio stations.
:::
### Restart All Radio Stations
```bash
(cli_command) azuracast:radio:restart
```
Shuts down both the frontends (Icecast, SHOUTcast, etc) and backends (Liquidsoap) of all radio stations, rewrites their configuration files, then relaunches them. This is identical to the "Restart Broadcasting" command inside the web interface.
::: warning
Running this command will disconnect all current active listeners to your radio stations.
:::
### Clear All Caches
```bash
(cli_command) cache:clear
```
Clears all caches used internally by AzuraCast. This can be used as a troubleshooting step if you are encountering issues with out-of-date information appearing on dashboard pages. Note that some pages may take slightly longer to load after all caches are cleared.
### Run Synchronization Tasks
```bash
(cli_command) sync:run [nowplaying|short|medium|long]
```
Manually invoke the synchronized tasks ("cron jobs") that normally run automatically behind the scenes to keep AzuraCast updated.
- **nowplaying** corresponds to the every-15-second check of all stations' currently playing song and listener metrics
- **short** corresponds to the every-minute sync task
- **medium** corresponds to the every-5-minutes sync task
- **long** corresponds to the every-hour sync task
These tasks can also be invoked directly from the web interface via the Administration homepage.
## Other Commands
The AzuraCast CLI interface also exposes a number of other advanced commands. These commands are intended for developers to use when building the application, and often should not be run by station owners on production installations.
For more information about the additional command line tools available, see their respective documentation pages below:
- [Doctrine Command Line Reference](https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/tools.html#command-overview)
- [Doctrine Migrations](https://www.doctrine-project.org/projects/doctrine-migrations/en/latest/reference/introduction.html#introduction)

16
docs/demo.md Normal file
View File

@ -0,0 +1,16 @@
---
title: Live Demo
---
Want to see AzuraCast for yourself?
We have a demo site with a small AzuraCast installation and a single radio station, where you can see the basics of the AzuraCast web interface in action.
Visit our demo site at [demo.azuracast.com](https://demo.azuracast.com/):
* Username: `demo@azuracast.com`
* Password: `demo`
::: tip Note
The AzuraCast demo instance automatically resets at the top of every hour to a fresh copy. If you try to access the demo site at exactly the top of the hour, you may be automatically redirected back to this page; just try again in a minute or two.
:::

126
docs/developing.md Normal file
View File

@ -0,0 +1,126 @@
---
title: Developing for AzuraCast
---
[[toc]]
## Best Practices
Development on the main AzuraCast application should always be applicable to a broad community of radio station operators and not specific features to one station or group of stations.
If you would like to build a set of features specific to one station or group of stations, you should take advantage of AzuraCast's plugin architecture. The plugin system takes advantage of event listeners that are built into AzuraCast itself. Check out the [example plugin](https://github.com/AzuraCast/example-plugin) for more details on what is possible via plugins.
## Setting Up a Local Environment
Regardless of your host operating system, it's highly recommended to use **Docker** when developing locally, as it offers portability, convenience, and a very close approximation of how AzuraCast runs on production environments.
For the steps below, we're assuming you've created a folder where you will store all of your AzuraCast-related projects, like `/home/myuser/azuracast/`.
You will need Git and Docker installed locally. If you're on Windows or Mac, the best way to use Docker is via the native [Docker Desktop](https://www.docker.com/products/docker-desktop) applications for those platforms.
For Windows, an installer tool like [Scoop](https://scoop.sh/) is highly recommended for dependencies like Git and your terminal of choice. A third-party shell client like
### Clone the Repositories
Using Git, clone the AzuraCast core repository and the various Docker containers into a single folder. When developing locally, the Docker containers are built from scratch, so you will need those repositories to be alongside the main "AzuraCast" project in the same folder.
In the same folder, run your platform's equivalent of:
```bash
git clone https://github.com/AzuraCast/AzuraCast.git
git clone https://github.com/AzuraCast/docker-azuracast-web.git
git clone https://github.com/AzuraCast/docker-azuracast-nginx.git
git clone https://github.com/AzuraCast/docker-azuracast-db.git
git clone https://github.com/AzuraCast/docker-azuracast-influxdb.git
git clone https://github.com/AzuraCast/docker-azuracast-redis.git
git clone https://github.com/AzuraCast/docker-azuracast-radio.git
```
::: tip NOTE
All commands from this point forward should be run in the `AzuraCast` repository's folder. From the parent folder, `cd AzuraCast` to enter the core repository's directory.
:::
### Copy Default Files
Inside the `AzuraCast` repository, copy the example files into their proper locations:
```bash
cp azuracast.dev.env azuracast.env
cp docker-compose.dev.yml docker-compose.yml
```
### Modify the Environment File
AzuraCast can automatically load data "fixtures" which will preconfigure a sample station with sensible defaults, to avoid needing to complete the setup process every time.
To customize how the fixtures load in your environment, open the newly customized `azuracast.env` file and customize the following values:
```
INIT_BASE_URL=docker.local
INIT_INSTANCE_NAME=local development
INIT_ADMIN_USERNAME=
INIT_ADMIN_PASSWORD=
INIT_MUSIC_PATH=/var/azuracast/www/util/fixtures/init_music
```
### Build the Docker Containers
Build the Docker containers from your local copies by running:
```bash
docker-compose build
```
### Run the in-container installation
Get into the main CLI container by running, from the host computer:
```bash
docker-compose run --rm cli bash
```
Inside the terminal session that spawns, you should already be at `/var/azuracast/www` and logged in as the `azuracast` user.
To install the necessary dependencies using Composer, run:
```bash
composer install
```
If you want to use the data fixtures (see the .env setup above for the necessary customizations) to set up an initial environment for you, run:
```bash
azuracast_cli azuracast:setup --load-fixtures
```
...otherwise, run:
```bash
azuracast_cli azuracast:setup
```
You can now `exit` the CLI shell.
### Spin up the Docker containers
Now that your installation is set up and ready, you can spin up your full installation for the first time.
From the host computer, run:
```bash
docker-compose up -d
```
By default, AzuraCast will be available at http://localhost/. A self-signed TLS certificate is also provided out of the box, so you can take advantage of the HTTPS functionality after manually exempting the site via your browser.
### Building Static Assets
AzuraCast uses a special Docker container containing the full static asset build stack. This makes it very easy to rebuild the compiled assets after having made changes to the JS or SCSS files.
To access the static container, run:
```bash
docker-compose run --rm static
```
From inside the container, you can execute `gulp` (with no flags) to build all CSS and JS files.

98
docs/docker_sh.md Normal file
View File

@ -0,0 +1,98 @@
---
title: Docker Utility Script
---
If you're using the Docker installation method to run AzuraCast, we have created a helpful utility script to perform common functions without having to type long command names.
[[toc]]
## Download the Utility Script
If you've recently followed the [Docker installation instructions](/install.html#using-docker-recommended), you already have the Docker Utility Script installed. The file name is `docker.sh`.
If you have an older installation, you can use the Docker Utility Script by running these commands inside your AzuraCast directory on your host computer:
```bash
curl -L https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/docker.sh > docker.sh
chmod a+x docker.sh
```
## Available Commands
### Run Command Line Tools
```bash
./docker.sh cli [command_name]
```
Runs any command exposed by the [command line interface](/cli.html) tools.
### Install AzuraCast
```bash
./docker.sh install
```
Pulls the latest version of all Docker images and sets up the AzuraCast database. When complete, your AzuraCast instance should be up and running.
### Update AzuraCast
```bash
./docker.sh update
```
Automatically pulls down any updated Docker images and applies any database and configuration changes since your last AzuraCast update.
### Uninstall AzuraCast
```bash
./docker.sh uninstall
```
Turns off and permanently deletes both the AzuraCast Docker containers and permanent volumes that store the AzuraCast database and station media.
::: danger
This command will fully remove any station media, statistics and metrics, and the entire database associated with your AzuraCast instance.
:::
### Back Up Files and Settings
```bash
./docker.sh backup [/path/to/backup.tar.gz]
```
Creates a .tar.gz backup copy of the media, statistics and metrics of every station, along with a copy of the full AzuraCast database. You can later restore from this same file in the event of data loss or corruption.
### Restore Files and Settings
```bash
./docker.sh restore /path/to/backup.tar.gz
```
Extracts a .tar.gz file previously created by this same script's `backup` command, copying media, statistics and metrics for each station into AzuraCast and importing the version of the database contained in the backup.
::: warning
Restoring from a backup will remove any existing AzuraCast database or media that exists inside the Docker volumes.
:::
### Set Up LetsEncrypt
```bash
./docker.sh letsencrypt-create
```
If you want your AzuraCast installation to support HTTPS, one of the easiest ways of accomplishing this is with [Let's Encrypt](https://letsencrypt.org/), a free provider of SSL certificates.
Once you have a domain name pointed to your AzuraCast installation, you can run the command above, specify your domain name, and AzuraCast will automatically verify your domain name and update the server with the SSL certificate.
::: tip
Your LetsEncrypt certificate is valid for 3 months. You should manually run the [renewal command](#renew-a-letsencrypt-certificate) or schedule a cron job to do it for you.
:::
### Renew a LetsEncrypt Certificate
```bash
./docker.sh letsencrypt-renew
```
This command will automatically renew a previously established LetsEncrypt certificate. This should be run at least every 3 months to prevent your certificates from expiring.

19
docs/donate.md Normal file
View File

@ -0,0 +1,19 @@
---
title: Donate to AzuraCast
---
AzuraCast is a fully free and open-source project built as a labor of love by a single developer over the course of many years. The project is continually improving and offering a better experience for radio station managers and listeners alike.
A message from the project's lead developer, [Buster "Silver Eagle" Neece](https://github.com/SlvrEagle23):
> Thank you for using AzuraCast, and thank you for visiting our donation page. I sincerely hope that you find AzuraCast to be a useful piece of software, whether you're running a small station or many large ones, or you're a fan of an AzuraCast-powered station. My goal when building AzuraCast was to provide a fresh new alternative to the world of web broadcasting that made the process easy and accessible to stations of any size.
>
> As some of you know, I am a disabled developer struggling to make ends meet. Beyond suffering from chronic depression and anxiety, I also live with a significant circadian rhythm sleep disorder that prevents me from maintaining more traditional working schedules. Some of the only work I can do that offers full schedule flexibility is on my own projects, which is how AzuraCast has come to be so heavily developed.
>
> Being free software, however, AzuraCast does not pay me a living wage. I have struggled financially in recent years as a result of my declining health, to the point that lately, even essential living expenses have been difficult to cover. Nevertheless, I continue to strongly believe in the principles of free and open-source software and in serving the public good with my work, and I am committed to keeping AzuraCast free and open for everyone.
>
> Donation is not required for any station of any size to use AzuraCast, but if you find the software useful and want to encourage its continued development, your support would make an immense difference in my daily life, and would be appreciated more than you know. Thank you again for visiting and for reading.
<a href="https://ko-fi.com/A736ATQ" target="_blank" title="Buy me a coffee!"><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=b' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
<a href="https://www.patreon.com/bePatron?u=232463" target="_blank" title="Become a Patron"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png"></a>

7
docs/faq.md Normal file
View File

@ -0,0 +1,7 @@
---
title: Frequently Asked Questions
---
[[toc]]
Coming soon!

105
docs/install.md Normal file
View File

@ -0,0 +1,105 @@
---
title: Install AzuraCast
---
AzuraCast is flexible and works on a broad number of environments, from inexpensive VPSes and servers to your own home computer running Windows, MacOS or Linux. There are two ways to install AzuraCast that differ significantly.
::: warning
AzuraCast currently only supports running on x86/x64 platforms. ARM/ARMHF platforms (i.e. the Raspberry Pi) are not currently supported due to a software compatibility issue. Follow [this issue](https://github.com/AzuraCast/AzuraCast/issues/332) for updates.
:::
[[toc]]
## Using Docker (Recommended)
We strongly recommend installing and using AzuraCast via Docker. All of the necessary software packages are built by our automated tools, so installation is as easy as just pulling down the pre-compiled images. There's no need to worry about compatibility with your host operating system, so any host (including Windows and MacOS) will work great out of the box.
You can use the AzuraCast Docker utility script to check for (and install, if necessary) the latest version of Docker and Docker Compose, then pull the necessary files and get your instance running.
If you're on a Linux server, you will need `sudo` and `curl` installed, if they aren't already, before running the installer scripts.
```bash
curl -L https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/docker.sh > docker.sh
chmod a+x docker.sh
./docker.sh install
```
Once installation has completed, be sure to follow the [post-installation steps](#post-installation-setup). You can also [set up LetsEncrypt](/docker_sh.html#set-up-letsencrypt) or make other changes to your installation using the [Docker Utility Script](/docker_sh.html) that you've just downloaded.
### Updating
Using the Docker utility script:
```bash
./docker.sh update
```
To manually update, from inside the base directory where AzuraCast is copied, run the following commands:
```bash
docker-compose down
docker-compose pull
docker-compose run --rm cli azuracast_update
docker-compose up -d
```
## Traditional Installation
The traditional installation is an advanced option available for those who want more complex customization options or are running on very limited hardware that can't handle the minor overhead of the Docker installation method.
Currently, the following operating systems are supported:
- Ubuntu 16.04 "Xenial" LTS
- Ubuntu 18.04 "Bionic" LTS
::: tip
Some web hosts offer custom versions of Ubuntu that include different software repositories. These may cause compatibility issues with AzuraCast. Many VPS providers are known to work out of the box with AzuraCast (OVH, DigitalOcean, Vultr, etc), and are thus highly recommended if you plan to use the traditional installer.
:::
AzuraCast is optimized for speed and performance, and can run on very inexpensive hardware, from the Raspberry Pi 3 to the lowest-level VPSes offered by most providers.
Since AzuraCast installs its own radio tools, databases and web servers, you should always install AzuraCast on a "clean" server instance with no other web or radio software installed previously.
Execute these commands **as a user with sudo permissions (or root)** to set up your AzuraCast server:
```bash
sudo apt-get update
sudo apt-get install -q -y git
sudo mkdir -p /var/azuracast/www
cd /var/azuracast/www
sudo git clone https://github.com/AzuraCast/AzuraCast.git .
sudo chmod a+x install.sh
./install.sh
```
The installation process will take between 5 and 15 minutes, depending on your Internet connection. If you encounter an error, let us know in the [Issues section](https://github.com/AzuraCast/AzuraCast/issues).
Once the terminal-based installation is complete, you can visit your server's public IP address (`http://ip.of.your.server/`) to finish the web-based setup.
### Updating
AzuraCast also includes a handy updater script that pulls down the latest copy of the codebase from Git, flushes the site caches and makes any necessary database updates. Run these commands as any user with `sudo` permissions:
```bash
cd /var/azuracast/www
sudo chmod a+x update.sh
sudo ./update.sh
```
## Installing on DigitalOcean
Our friends at DigitalOcean offer fast, affordable, scalable hosting that is perfect for services like AzuraCast. Thanks to their support for custom intstallation metadata, you can spin up a new droplet and have a running AzuraCast instance without ever needing to leave your browser. Check out our [detailed DigitalOcean installation guide](/install_do.html) for instructions.
## Post-Installation Setup
Once installation is complete, you should immediately visit your server's public web address. This may be the IP of the server, a domain name (if you've registered one and pointed it at the server), or `localhost` if you're running AzuraCast on your personal computer.
The initial web setup consists of the following steps:
1. Creating a "Super Administrator" account with system-wide administratration permissions
2. Creating the first radio station that the system will manage
3. Customizing important AzuraCast settings, like the site's base URL and HTTPS settings
Don't worry if you aren't sure of these items yet; you can always make changes to any of the items after setup is complete.

65
docs/install_do.md Normal file
View File

@ -0,0 +1,65 @@
---
title: Install with DigitalOcean
---
![](/img/DO_Logo_Horizontal_Blue.png)
Our friends over at [DigitalOcean](https://digitalocean.com) have generously sponsored AzuraCast's development, providing us with a powerful platform to launch servers quickly and easily.
Thanks to DigitalOcean's droplet provisioning tools, you can set up a new AzuraCast instance as a DO droplet with almost zero effort, without ever needing to log in to the server itself.
[[toc]]
## Installation Steps
### Create an Account
If you don't already have one, [create a new DigitalOcean account](https://m.do.co/c/21612b90440f). Setting up two-factor authentication is also highly recommended.
### Create a New Droplet
![](/img/install_do_create.png)
From your dashboard, click the "Create" dropdown at the top right, then click "Droplets".
### Droplet Settings
![](/img/install_do_distro.png)
From the image selection screen, select your preferred distribution. It's highly recommended that you select Ubuntu 18.04 for compatibility, but you can select any distribution that will run the latest version of Docker and Docker Compose.
When selecting a droplet, consider the expected number of stations and mount points you plan to operate. One single station can easily operate on a droplet with 1 VCPU and 1 or 2GB of RAM, but for multiple stations, you'll want to scale up accordingly. Keep in mind that every distinct mount point on each station increases the processing workload of the server by a small amount (usually about 10% of one VCPU).
Choose the backup, storage and datacenter region settings that are appropriate for your needs.
Most importantly, when you reach the "Select additional options" step, make sure to check the box labeled "User data":
![](/img/install_do_userdata.png)
A text box will appear underneath the checkboxes. Copy and paste the code below (including the first line with the hash symbol) as-is into the field:
```bash
#!/bin/bash
mkdir -p /var/azuracast
cd /var/azuracast
curl -L https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/docker.sh > docker.sh
chmod a+x docker.sh
yes | ./docker.sh install
```
It is recommended to add your own SSH keys and use these to log in for enhanced security.
AzuraCast will automatically download and install after your droplet is provisioned.
### Finishing Setup
![](/img/install_do_ip.png)
As soon as the AzuraCast installer is complete, you will be able to continue setup by visiting your droplet's IP. You can find and copy your droplet's IP from the main dashboard as shown above.
### Updating AzuraCast
This process is equivalent to following the Docker installation steps (except easier!), so updating your installation is the same as it would be with any Docker installation.
The Docker Utility Script and other files can be found at `/var/azuracast/`. Check out the [Docker Utility Script](/docker_sh.html) documentation for more available commands.

31
docs/mascot.md Normal file
View File

@ -0,0 +1,31 @@
---
title: AzuraCast's Mascot
---
![Azura Ruisselante Mascot Photo](/img/mascot/azura_normal_transparent.png)
## Meet Azura Ruisselante
Azura Ruisselante is a broadcasting unicorn. Taking advantage of both the aesthetic perks of being a unicorn (and always having a nice place to hang her microphone) and her own "magic" powers, she travels from place to place, sending her soothing voice across the airwaves wherever she goes.
Azura's first name, like AzuraCast itself, is named after the prominent deep blue color featured across both the web application itself and its mascot's design, often referred to as "azure" blue.
Azura's last name, Ruisselante, is the French word for "streaming", but not like radio streaming; rather, like the motion of water through a small river or over a waterfall. The name is intended as something of a double metaphor, as AzuraCast is both "streaming" software, and Azura's design (particularly her mane) is long, flowing, and indeed "streaming". The name is also a nod to our French developer friends, who were instrumental in helping develop the early internationalization of the application, which is now available in many languages around the world.
## Azura's Creator
Azura was envisioned and designed by renowned digital artist [Tyson Tan](https://tysontan.deviantart.com/). A long-time supporter and user of Free and Open-Source Software, Tyson Tan very generously donated his time and creativity to create our project's beautiful mascot.
When creating Azura, Tyson Tan wanted to preserve the heritage of this project. In 2012, what is now AzuraCast started as [Ponyville Live](https://github.com/SlvrEagle23/Ponyville-Live), a radio station and media aggregator specifically built for the My Little Pony fandom. Azura is inspired by the show's signature style, but with a distinct visual appearance that's unique to this project.
Tyson Tan is also the artist behind [Krita's Kiki](https://krita.org/en/about/kiki/), [KDE's Konqi](https://en.wikipedia.org/wiki/Konqi) and many others. We're immensely grateful to Tyson Tan for his support of our project and the FOSS community at large.
## Alternate Versions
### Pony Version
![Pony version of Azura by Tyson Tan](/img/mascot/azura_pony.png)
### Anthropomorphic Version
![Anthropomorphic version of Azura by Tyson Tan](/img/mascot/azura_furry.png)

27
docs/screenshots.md Normal file
View File

@ -0,0 +1,27 @@
---
title: Screenshots
---
Note: AzuraCast is an actively-maintained product that is still in beta, and as such these screenshots may not represent the exact current appearance of the software.
[[toc]]
### Login Screen
![](http://i.imgur.com/XExFCFP.png)
### Main Dashboard
![](http://i.imgur.com/Z0S9Ybl.png)
### Administration Panel
![](http://i.imgur.com/O3jKFUj.png)
### Station Profile Page
![](http://i.imgur.com/zfUCt8b.png)
### Station Profile Page on Mobile Devices
![](http://i.imgur.com/wcTaqS8.png)

View File

@ -0,0 +1,10 @@
FROM node:alpine
WORKDIR /data
COPY package.json .
COPY yarn.lock .
RUN yarn install
CMD ["yarn", "dev"]

View File

@ -0,0 +1,9 @@
{
"scripts": {
"dev": "vuepress dev docs",
"build": "vuepress build docs"
},
"devDependencies": {
"vuepress": "^0.10.0"
}
}

6121
util/docker/docs/yarn.lock Normal file

File diff suppressed because it is too large Load Diff