Skip to content

Server installation

ierror edited this page Jun 26, 2012 · 5 revisions

Server installation (Debian wheezy)

Basic system setup

Create Database

su - postgres
psql <ENTER>
CREATE DATABASE "beautifulmind"  WITH OWNER "postgres" ENCODING 'UTF8';

Install project

Create folder structure

mkdir -p /opt/beautifulmind/
cd /opt/beautifulmind/
git clone git://github.com/nerdsportgruppe/BeautifulMind.io.git www
cd www
git checkout production
chown -R www-data:www-data /opt/beautifulmind/

Create environment.py within project root (same level as settings.py):

# -*- coding: utf-8 -*-
NAME = 'boerni'
IS_FOR_DEVELOPMENT = True
SECRET_KEY = 'MAKE ME VERY UNIQUE!!!!!!!!!!!!!!!!!!!'	%HRJ&T/KZ(JH&G/E$&HR'
ADMINS = (
	('Bernhard', 'mail@example.com'),
)

Copy configuration file _50_env_production.py within configuration/

Make sure FOO within _50_env_FOO.py matches your environment.py NAME field and edit settings

Setup virtualenv (chdir to project root (same level as settings.py))

virtualenv --no-site-packages virtualenv
source virtualenv/bin/activate
pip install -r REQUIREMENTS

Django

./manage.py syncdb
./manage.py migrate

Run dev env

./manage.py runserver_plus 0.0.0.0:8000
./manage.py mindmaptornado_run