Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
129 lines (86 sloc) 2.41 KB


Install prerequisites

Install the prerequisites for your Linux distribution as described here.

Create user

Either run Daiquiri as your regular Desktop user or create a dedicated user:

useradd -m -d /srv/daiquiri daiquiri -s /bin/bash
su - daiquiri

Don't run Daiquiri as root!

Clone the app

Clone the django-daiquiri-app to a directory of your choice:

git clone app

Install python dependencies

Change to the app directory and create a virtualenv:

cd ../app
virtualenv env
source env/bin/activate

or for python3:

cd app
python3 -m venv env3
source env3/bin/activate

Install the requirements:

pip install django-daiquiri
pip install mysqlclient      # for MySQL
pip install psycopg2-binary  # for PostgreSQL

Setup the app

Create a log and a download directory:

mkdir log download

Copy the settings file:

cp config/settings/ config/settings/

Edit config/settings/ for database settings, ASYNC = True and DEBUG = True.

Create the front end library vendor bundles:

./ download_vendor_files

Next, the differenet users and permissions need to be created on the database. For this purpose, the sqlcreate can be used to see what needs to be executed on the database:

./ sqlcreate                             # databases, users and permissions to run daiquiri
./ sqlcreate --test                      # databases, users and permissions to run tests
./ sqlcreate --schema=daiquiri_data_obs  # databases, users and permissions to use a particular schema with scientific data

Copy the output line by line to a database shell, or use a pipe.

Run the database migrations:

./ migrate
./ migrate --database=data

Create a superuser

./ createsuperuser

Run the development server:

./ runserver

Go to http://localhost:8000 in your web browser.

Open three other terminals, got to the app directory, activate the virtual environment, and run:

./ runworker default
./ runworker query
./ runworker download

to start the different workers.