Installing web application¶
To allow RadioCo to generate correct dates it’s necessary to set the timezone variable:
- Find your timezone in this list
- Go to the config folder (radioco/configs/base) and create if not exists a local_settings.py in the same directory than settings.py
- Add to the local settings the variable timezone, for example: TIME_ZONE = “Europe/Madrid”
This tutorial is written for Python 2.7 and Ubuntu 12.04 or later.
Open a terminal and introduce the following commands:
sudo apt-get install git-core python-dev python-pip
Next, download the project and cd into it:
git clone https://github.com/iago1460/django-radio cd django-radio
Install the python invoke library:
pip install invoke==0.14.0
Execute the next command to deploy the app in docker, this step take some time:
If you have faced the error “ValueError: unknown locale: UTF-8” on MacOS X, execute:
export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8
Using RadioCo on production¶
The Internet is a hostile environment. Before deploying this project, you should take some time to review your settings, with security, performance, and operations in mind. Keep in mind this critical settings.
RadioCo provides a staging environment, safer than the previous one but still insecure, use at your own risk.
inv docker.setup -e staging
Now that the server’s running, visit http://127.0.0.1/
To create a superuser you still can use management commands:
inv docker.manage -e staging -c "createsuperuser"