Compare commits
No commits in common. "7dec6a49ae3c6dbf6d60a1d1bf0f945aec1d7d00" and "876e4cdfa7c3084a7b8b7a65316653b77d44c160" have entirely different histories.
7dec6a49ae
...
876e4cdfa7
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,6 +5,3 @@ venv/
|
||||||
node_modules/
|
node_modules/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
*.egg
|
*.egg
|
||||||
|
|
||||||
db.sqlite3
|
|
||||||
instance/settings/settings.py
|
|
||||||
|
|
47
README.md
47
README.md
|
@ -1,9 +1,10 @@
|
||||||

|

|
||||||
|
|
||||||
A platform to manage radio schedules, website content, and more. It uses the power of great tools like Django or Liquidsoap.
|
Platform to manage a radio, schedules, website, and so on. We use the power of great tools like Django or Liquidsoap.
|
||||||
|
|
||||||
This project is distributed under GPL version 3. More information in the LICENSE file, except for some files whose license is indicated inside source code.
|
This project is distributed under GPL version 3. More information in the LICENSE file, except for some files whose license is indicated inside source code.
|
||||||
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* **streams**: multiple random music streams when no program is played. We also can specify a time range and frequency for each;
|
* **streams**: multiple random music streams when no program is played. We also can specify a time range and frequency for each;
|
||||||
* **diffusions**: generate diffusions time slot for programs that have schedule informations. Check for conflicts and rerun.
|
* **diffusions**: generate diffusions time slot for programs that have schedule informations. Check for conflicts and rerun.
|
||||||
|
@ -14,44 +15,7 @@ This project is distributed under GPL version 3. More information in the LICENSE
|
||||||
* **cms**: content management system.
|
* **cms**: content management system.
|
||||||
|
|
||||||
|
|
||||||
## Architecture and concepts
|
## Scripts
|
||||||
Aircox is divided in two main modules:
|
|
||||||
* `aircox`: basics of Aircox (programs, diffusions, sounds, etc. management); interface for managing a website with Aircox elements (playlists, timetable, players on the website);
|
|
||||||
* `aircox_streamer`: interact with application to generate audio stream (LiquidSoap);
|
|
||||||
|
|
||||||
## Development setup
|
|
||||||
Start installing a virtual environment :
|
|
||||||
|
|
||||||
```
|
|
||||||
virtualenv venv
|
|
||||||
source venv/bin/activate
|
|
||||||
pip install -r requirements.txt
|
|
||||||
pip install -r requirements_tests.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
Then copy the default settings and initiate the database :
|
|
||||||
|
|
||||||
```
|
|
||||||
cp instance/settings/sample.py instance/settings/settings.py
|
|
||||||
python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())" >> instance/settings/settings.py
|
|
||||||
DJANGO_SETTINGS_MODULE=instance.settings.dev ./manage.py migrate
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally test and run the instance using development settings, and point your browser to http://localhost:8000 :
|
|
||||||
|
|
||||||
```
|
|
||||||
DJANGO_SETTINGS_MODULE=instance.settings.dev pytest
|
|
||||||
DJANGO_SETTINGS_MODULE=instance.settings.dev ./manage.py runserver
|
|
||||||
```
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
Running Aircox on production involves:
|
|
||||||
* Aircox modules and a running Django project;
|
|
||||||
* a supervisor for common tasks (sounds monitoring, stream control, etc.) -- `supervisord`;
|
|
||||||
* a wsgi and an HTTP server -- `gunicorn`, `nginx`;
|
|
||||||
* a database supported by Django (MySQL, SQLite, PostGresSQL);
|
|
||||||
|
|
||||||
### Scripts
|
|
||||||
Are included various configuration scripts that can be used to ease setup. They
|
Are included various configuration scripts that can be used to ease setup. They
|
||||||
assume that the project is present in `/srv/apps/aircox`:
|
assume that the project is present in `/srv/apps/aircox`:
|
||||||
|
|
||||||
|
@ -63,6 +27,7 @@ The scripts are written with a combination of `cron`, `supervisord`, `nginx`
|
||||||
and `gunicorn` in mind.
|
and `gunicorn` in mind.
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
### Dependencies
|
### Dependencies
|
||||||
For python dependencies take a peek at the `requirements.txt` file, plus
|
For python dependencies take a peek at the `requirements.txt` file, plus
|
||||||
dependencies specific to Django (e.g. for database: `mysqlclient` for MySql
|
dependencies specific to Django (e.g. for database: `mysqlclient` for MySql
|
||||||
|
@ -97,8 +62,8 @@ pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
You must write a settings.py file in the `instance/settings` directory (you can just
|
You must write a settings.py file in the `instance` directory (you can just
|
||||||
copy and paste `instance/settings/sample.py`. There still is configuration
|
copy and paste `instance/sample_settings.py`. There still is configuration
|
||||||
required in this file, check it in for more info.
|
required in this file, check it in for more info.
|
||||||
|
|
||||||
|
|
||||||
|
|
25
docs/technicians.md
Executable file
25
docs/technicians.md
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
# General information
|
||||||
|
Aircox is a set of Django applications that aims to provide a radio management solution, and is
|
||||||
|
written in Python 3.5.
|
||||||
|
|
||||||
|
Running Aircox on production involves:
|
||||||
|
* Aircox modules and a running Django project;
|
||||||
|
* a supervisor for common tasks (sounds monitoring, stream control, etc.) -- `supervisord`;
|
||||||
|
* a wsgi and an HTTP server -- `gunicorn`, `nginx`;
|
||||||
|
* a database supported by Django (MySQL, SQLite, PostGresSQL);
|
||||||
|
|
||||||
|
# Architecture and concepts
|
||||||
|
Aircox is divided in three main modules:
|
||||||
|
* `programs`: basics of Aircox (programs, diffusions, sounds, etc. management);
|
||||||
|
* `controllers`: interact with application to generate audio stream (LiquidSoap);
|
||||||
|
* `cms`: create a website with Aircox elements (playlists, timetable, players on the website);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
|
||||||
|
# Configuration
|
|
@ -7,7 +7,6 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
DEBUG = True
|
|
||||||
|
|
||||||
LOCALE_PATHS = ["aircox/locale", "aircox_streamer/locale"]
|
LOCALE_PATHS = ["aircox/locale", "aircox_streamer/locale"]
|
||||||
|
|
||||||
|
@ -16,7 +15,7 @@ LOGGING = {
|
||||||
"disable_existing_loggers": False,
|
"disable_existing_loggers": False,
|
||||||
"formatters": {
|
"formatters": {
|
||||||
"timestamp": {
|
"timestamp": {
|
||||||
"format": "{asctime} {module} {levelname} {message}",
|
"format": "{asctime} {levelname} {message}",
|
||||||
"style": "{",
|
"style": "{",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -27,10 +26,6 @@ LOGGING = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"loggers": {
|
"loggers": {
|
||||||
"root": {
|
|
||||||
"handlers": ["console"],
|
|
||||||
"level": os.getenv("DJANGO_LOG_LEVEL", "DEBUG"),
|
|
||||||
},
|
|
||||||
"aircox": {
|
"aircox": {
|
||||||
"handlers": ["console"],
|
"handlers": ["console"],
|
||||||
"level": os.getenv("DJANGO_LOG_LEVEL", "DEBUG"),
|
"level": os.getenv("DJANGO_LOG_LEVEL", "DEBUG"),
|
||||||
|
@ -45,9 +40,3 @@ LOGGING = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
CACHES = {
|
|
||||||
"default": {
|
|
||||||
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ For Django settings see:
|
||||||
https://docs.djangoproject.com/en/3.1/topics/settings/
|
https://docs.djangoproject.com/en/3.1/topics/settings/
|
||||||
https://docs.djangoproject.com/en/3.1/ref/settings/
|
https://docs.djangoproject.com/en/3.1/ref/settings/
|
||||||
"""
|
"""
|
||||||
from django.utils import timezone
|
|
||||||
from zoneinfo import ZoneInfo
|
from zoneinfo import ZoneInfo
|
||||||
from .prod import *
|
from .prod import *
|
||||||
|
|
||||||
|
|
|
@ -17,5 +17,5 @@ dateutils~=0.6
|
||||||
mutagen~=1.45
|
mutagen~=1.45
|
||||||
Pillow~=9.0
|
Pillow~=9.0
|
||||||
psutil~=5.9
|
psutil~=5.9
|
||||||
PyYAML==6.0.1
|
PyYAML==5.4
|
||||||
watchdog~=2.1
|
watchdog~=2.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user