Permalink
Browse files

Update deployment scripts and default settings

  • Loading branch information...
1 parent 8c2d5a1 commit a13d9bc4885f7946bd3906fe099c26e5a7ff5622 @guaq guaq committed Apr 14, 2012
Showing with 13 additions and 15 deletions.
  1. +9 −10 apache/https-vhost-config
  2. +1 −0 requirements.txt
  3. +0 −1 sikteeri/local_settings.py.template
  4. +3 −4 sikteeri/settings.py
View
@@ -9,25 +9,24 @@
Header set Strict-Transport-Security "max-age=86400"
- WSGIApplicationGroup deployment-name
- WSGIDaemonProcess deployment-name python-path=<path-to-git-repo>:<path-to-env-site-packages> home=<path-to-git-repo>/sikteeri user=<user> group=<user>
- WSGIProcessGroup deployment-name
- WSGIScriptAlias <path-to-webroot>/django.wsgi
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} !static/
+ RewriteRule ^(.*)$ http://127.0.0.1:<gunicorn-port>/$1 [L,P]
- Alias /deployment-name/static/membership <path-to-git-repo>/membership/static
- <Directory <path-to-git-repo>/membership/static>
+ Alias /static/admin <path-to-admin-media>
+ <Directory <path-to-admin>>
Order allow,deny
Allow from all
</Directory>
- Alias /deployment-name/membership <path-to-git-repo>/static
- <Directory <path-to-git-repo>/sikteeri/static>
+ Alias /static/membership <path-to-git-repo>/membership/static
+ <Directory <path-to-git-repo>/membership/static>
Order allow,deny
Allow from all
</Directory>
- Alias /deployment-name/admin_media <path-to-admin-media>
- <Directory <path-to-admin-media>>
+ Alias /static <path-to-git-repo>/static
+ <Directory <path-to-git-repo>/sikteeri/static>
Order allow,deny
Allow from all
</Directory>
View
@@ -1,2 +1,3 @@
Django==1.4.0
gunicorn==0.14.2
+psycopg2==2.4.5
@@ -39,5 +39,4 @@ EMAIL_SUBJECT_PREFIX = '[sikteeri] '
#EMAIL_BACKEND = 'mboxemailbackend.EmailBackend'
#EMAIL_MBOX_FILE_PATH = 'sikteeri.mbox' # change this to a proper location
-MEDIA_URL = 'http://localhost:12765'
TRUSTED_HOSTS = ['127.0.0.1']
View
@@ -45,10 +45,7 @@
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
-# trailing slash.
-# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '/media/'
+STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
@@ -110,6 +107,8 @@
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
+USE_X_FORWARDED_HOST = True
+
from local_settings import *
# Is this the right way to do this?

0 comments on commit a13d9bc

Please sign in to comment.