production apache and mod_wsgi configs

pull/1/head
Ed Summers 2011-10-07 03:14:29 +00:00
parent fa855e81bf
commit d7f2101166
3 changed files with 61 additions and 4 deletions

14
deploy/regluit.conf Normal file
View File

@ -0,0 +1,14 @@
WSGIPythonHome /opt/regluit/ENV
WSGISocketPrefix /opt/regluit
WSGIDaemonProcess regluit-wsgi-app processes=4 threads=4 python-eggs=/tmp/regluit-python-eggs
WSGIScriptAlias / /opt/regluit/deploy/regluit.wsgi
<Directory /opt/regluit/static>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /static /opt/regluit/static

View File

@ -1,10 +1,8 @@
#!/usr/bin/env python
import os
import socket
import django.core.handlers.wsgi
hostname = socket.gethostname()
os.environ['DJANGO_SETTING_MODULE'] = 'regluit.settings_%s' % hostname
application = django.core.handlers.wsgi.WSGIHander()
os.environ['DJANGO_SETTINGS_MODULE'] = 'regluit.settings.prod'
application = django.core.handlers.wsgi.WSGIHandler()

45
settings/prod.py Normal file
View File

@ -0,0 +1,45 @@
from regluit.settings.common import *
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Ed Summers', 'ehs@pobox.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'unglueit_dev',
'USER': 'unglueit_dev',
'PASSWORD': 'unglu3it',
'HOST': 'gluejardb.cboagmr25pjs.us-east-1.rds.amazonaws.com',
'PORT': '',
}
}
TIME_ZONE = 'America/New_York'
SECRET_KEY = '_^_off!8zsj4+)%qq623m&$7_m-q$iau5le0w!mw&n5tgt#x=t'
# django
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'ed.summers@gmail.com'
EMAIL_HOST_PASSWORD = 'hvkhjwujmwzvraag'
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = 'info@gluejar.com'
# twitter auth
TWITTER_CONSUMER_KEY = 'sd9StEg1N1qB8gGb2GRX4A'
TWITTER_CONSUMER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0'
# facebook auth
FACEBOOK_APP_ID = '242881179080779'
FACEBOOK_API_SECRET = '5eae483a0e92113d884c427b578ef23a'
# google auth
GOOGLE_OAUTH2_CLIENT_ID = '989608723367.apps.googleusercontent.com'
GOOGLE_OAUTH2_CLIENT_SECRET = '3UqalKyNynnaaarumUIWh8vS'
GOOGLE_DISPLAY_NAME = 'unglue it!'