Commit 360c650f authored by Giuseppe Terrasi's avatar Giuseppe Terrasi

 * settings_local.py: apply several changes for deploy facilities
 * setting up italian translation
 * documented apache rules
 * documented virtualenv and deplory steps
parent 8a483e06
= Required stuff =
CHANGE_THIS_PATH is equal to new third level domain url or folder that containing it
= Virtualenv =
Follow this step:
1) apt-get install python-setuptools python-dev build-essential
2) easy_install virtualenv
3) cd srv/CHANGE_THIS_PATH
4) mkdir env
5) virtualenv –python=/usr/bin/python2.6 --no-site-packages env/
6) sudo env/bin/easy_install django==1.3 South==0.7.5 Sphinx==1.0 django-openid-auth==0.2 django-debug-toolbar==0.8 \\
django-migrator==0.3 html5lib markdown elementtidy sphinxsearch psycopg2
= Database =
"osqa" user and a "osqa" database.
= Apache =
See 00-apache_site_avaible_rules file.
= Deploy =
1) Put bzr lp:ubuntu-it-ask into /srv/CHANGE_THIS_PATH/www/osqa/ and apply changes in osqa.wsgi and settings_local.py in order to reflect \\
the correct url and path.
2) python manage.py syncdb --all (no create super user)
3) python manage.py migrate forum --fake
4) python manage.py makemessages -a (or "-l it" is sufficient)
= Permission =
sudo chown -R www-data:www-data osqa
sudo chmod -R g+w /srv/CHANGE_THIS_PATH/www/osqa/forum/upfiles
sudo chmod -R g+w /srv/CHANGE_THIS_PATH/www/osqa/log
WSGISocketPrefix ${APACHE_RUN_DIR}
<VirtualHost *:80>
DocumentRoot /srv/CHANGE_THIS_PATH/www/osqa/
ServerName CHANGE_THIS
ServerAlias CHANGE_THIS
Alias /osqa/m/ "/srv/CHANGE_THIS_PATH/www/osqa/forum/skins/"
<Directory "/srv/CHANGE_THIS_PATH/www/osqa/forum/skins">
Order allow,deny
Allow from all
</Directory>
Alias /osqa/upfiles/ "/srv/CHANGE_THIS_PATH/www/osqa/forum/upfiles/"
<Directory "/srv/CHANGE_THIS_PATH/www/osqa/forum/upfiles">
Order deny,allow
Allow from all
</Directory>
Alias /admin_media/ /srv/CHANGE_THIS_PATH/env/lib/python2.7/site-packages/Dja$
<Directory /srv/CHANGE_THIS_PATH/env/lib/python2.7/site-packages/Django-1.3-p$
Order allow,deny
Allow from all
WSGIScriptAlias / /srv/CHANGE_THIS_PATH/www/osqa/osqa.wsgi
CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
</VirtualHost>
K 25
svn:wc:ra_dav:version-url
V 43
/svnroot/!svn/ver/1239/osqa/trunk/locale/en
END
10
dir
1272
http://svn.osqa.net/svnroot/osqa/trunk/locale/en
http://svn.osqa.net/svnroot
2012-04-02T21:22:37.837431Z
1239
jordan
0cfe37f9-358a-4d5e-be75-b63607b5c754
LC_MESSAGES
dir
K 25
svn:wc:ra_dav:version-url
V 55
/svnroot/!svn/ver/1239/osqa/trunk/locale/en/LC_MESSAGES
END
django.mo
K 25
svn:wc:ra_dav:version-url
V 65
/svnroot/!svn/ver/1239/osqa/trunk/locale/en/LC_MESSAGES/django.mo
END
django.po
K 25
svn:wc:ra_dav:version-url
V 65
/svnroot/!svn/ver/1239/osqa/trunk/locale/en/LC_MESSAGES/django.po
END
10
dir
1272
http://svn.osqa.net/svnroot/osqa/trunk/locale/en/LC_MESSAGES
http://svn.osqa.net/svnroot
2012-04-02T21:22:37.837431Z
1239
jordan
0cfe37f9-358a-4d5e-be75-b63607b5c754
django.mo
file
2012-06-22T20:34:48.141709Z
7e18bb38148873dc31bb9b0f45a0ac52
2012-04-02T21:22:37.837431Z
1239
jordan
has-props
6639
django.po
file
2012-06-22T20:34:48.141709Z
3151183b7f3272c228b091094876836b
2012-04-02T21:22:37.837431Z
1239
jordan
263851
K 13
svn:mime-type
V 24
application/octet-stream
END
This diff is collapsed.
This diff is collapsed.
...@@ -26,33 +26,40 @@ INTERNAL_IPS = ('127.0.0.1',) ...@@ -26,33 +26,40 @@ INTERNAL_IPS = ('127.0.0.1',)
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'osqa', 'NAME': 'database_name',
'USER': 'root', 'USER': 'database_user',
'PASSWORD': '', 'PASSWORD': 'database_password',
'HOST': '', 'HOST': '',
'PORT': '', 'PORT': '',
} }
} }
CACHE_BACKEND = 'file://%s' % os.path.join(os.path.dirname(__file__),'cache').replace('\\','/') #CACHE_BACKEND = 'file://%s' % os.path.join(os.path.dirname(__file__),'cache').replace('\\','/')
#CACHE_BACKEND = 'dummy://' #CACHE_BACKEND = 'dummy://'
CACHE_BACKEND = 'memcached://<server-address>:<port>/'
SESSION_ENGINE = 'django.contrib.sessions.backends.db' SESSION_ENGINE = 'django.contrib.sessions.backends.db'
SPHINX_API_VERSION = 0x113 #refer to djangosphinx documentation
SPHINX_SEARCH_INDICES=('osqa',)
SPHINX_SERVER='localhost'
SPHINX_PORT=3312
# This should be equal to your domain name, plus the web application context. # This should be equal to your domain name, plus the web application context.
# This shouldn't be followed by a trailing slash. # This shouldn't be followed by a trailing slash.
# I.e., http://www.yoursite.com or http://www.hostedsite.com/yourhostapp # I.e., http://www.yoursite.com or http://www.hostedsite.com/yourhostapp
APP_URL = 'http://' APP_URL = 'http://CHANGE_THIS_PATH'
#LOCALIZATIONS #LOCALIZATIONS
TIME_ZONE = 'America/New_York' TIME_ZONE = 'Europe/Rome'
#OTHER SETTINGS #OTHER SETTINGS
USE_I18N = True USE_I18N = True
LANGUAGE_CODE = 'en' LANGUAGE_CODE = 'it'
DJANGO_VERSION = 1.1 DJANGO_VERSION = 1.3
OSQA_DEFAULT_SKIN = 'default' OSQA_DEFAULT_SKIN = 'default'
DISABLED_MODULES = ['books', 'recaptcha', 'project_badges'] DISABLED_MODULES = ['books', 'recaptcha', 'project_badges', 'mysqlfulltxt', 'localauth']
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment