merge aircox and aircox_instance

This commit is contained in:
bkfox
2016-10-10 15:04:15 +02:00
parent 72fd7bd490
commit 191d337c3f
100 changed files with 4686 additions and 360 deletions

8
scripts/cron_diffusions Executable file
View File

@ -0,0 +1,8 @@
#! /bin/sh
# aircox daily tasks:
# - diffusions monitoring for the current month
/srv/apps/aircox/manage.py diffusions_monitor --update --clean --check
# - diffusions monitoring for the next month
/srv/apps/aircox/manage.py diffusions_monitor --update --next-month

27
scripts/nginx_aircox Normal file
View File

@ -0,0 +1,27 @@
# Sample configuration file for Nginx.
#
# The binding is done to a Gunicorn's instance (cf. supervisor scripts),
# on local port 8042 # and assumes that static files are in
# /srv/apps/aircox/static.
#
# You want to change the server_name and static location to suit your needs
#
server {
server_name aircox.somewhere.net;
listen 80;
location / {
proxy_pass http://127.0.0.1:8042/;
proxy_read_timeout 300;
proxy_redirect off;
proxy_buffering off;
proxy_store off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /static/ {
alias /srv/apps/aircox/static/ ;
}
}

44
scripts/supervisord_aircox Executable file
View File

@ -0,0 +1,44 @@
; Supervisor sample config file for Aircox.
;
; It assumes that the instance is installed in the directory
; "/srv/apps/aircox". It requires Gunicorn in order to run the
; WSGI server.
;
; * aircox_server: WSGI server instance using Gunicorn for production;
; Note that it does not serve static files.
; * aircox_sounds_monitor: sounds scanning, monitoring, quality-check,
; and synchronisation with the database.
; * aircox_controllers: audio stream generation and monitoring; create
; config and playlists, and run the required programs.
; note: must be restarted after changes in controller's sources.
;
[program:aircox_server]
command = gunicorn --bind 127.0.0.1:8042 instance.wsgi:application
directory = /srv/apps/aircox
user = aircox
autostart = true
autorestart = true
stdout_logfile = /srv/apps/aircox/logs/server.log
redirect_stderr = true
environment=AIRCOX_DEBUG="False"
[program:aircox_sounds_monitor]
command = /srv/apps/aircox/manage.py sounds_monitor -qsm
directory = /srv/apps/aircox
user = aircox
autostart = true
autorestart = true
stdout_logfile = /srv/apps/aircox/logs/sounds_monitor.log
redirect_stderr = true
[program:aircox_controllers]
command = /srv/apps/aircox/manage.py controllers -crm
directory = /srv/apps/aircox
user = aircox
autostart = true
autorestart = true
stdout_logfile = /srv/apps/aircox/logs/controllers.log
redirect_stderr = true