Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update deployment scripts and default settings
  • Loading branch information
ahinkka committed Apr 14, 2012
1 parent 8c2d5a1 commit a13d9bc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
19 changes: 9 additions & 10 deletions apache/https-vhost-config
Expand Up @@ -9,25 +9,24 @@


Header set Strict-Transport-Security "max-age=86400" Header set Strict-Transport-Security "max-age=86400"


WSGIApplicationGroup deployment-name RewriteEngine On
WSGIDaemonProcess deployment-name python-path=<path-to-git-repo>:<path-to-env-site-packages> home=<path-to-git-repo>/sikteeri user=<user> group=<user> RewriteCond %{REQUEST_FILENAME} !static/
WSGIProcessGroup deployment-name RewriteRule ^(.*)$ http://127.0.0.1:<gunicorn-port>/$1 [L,P]
WSGIScriptAlias <path-to-webroot>/django.wsgi


Alias /deployment-name/static/membership <path-to-git-repo>/membership/static Alias /static/admin <path-to-admin-media>
<Directory <path-to-git-repo>/membership/static> <Directory <path-to-admin>>
Order allow,deny Order allow,deny
Allow from all Allow from all
</Directory> </Directory>


Alias /deployment-name/membership <path-to-git-repo>/static Alias /static/membership <path-to-git-repo>/membership/static
<Directory <path-to-git-repo>/sikteeri/static> <Directory <path-to-git-repo>/membership/static>
Order allow,deny Order allow,deny
Allow from all Allow from all
</Directory> </Directory>


Alias /deployment-name/admin_media <path-to-admin-media> Alias /static <path-to-git-repo>/static
<Directory <path-to-admin-media>> <Directory <path-to-git-repo>/sikteeri/static>
Order allow,deny Order allow,deny
Allow from all Allow from all
</Directory> </Directory>
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
@@ -1,2 +1,3 @@
Django==1.4.0 Django==1.4.0
gunicorn==0.14.2 gunicorn==0.14.2
psycopg2==2.4.5
1 change: 0 additions & 1 deletion sikteeri/local_settings.py.template
Expand Up @@ -39,5 +39,4 @@ EMAIL_SUBJECT_PREFIX = '[sikteeri] '
#EMAIL_BACKEND = 'mboxemailbackend.EmailBackend' #EMAIL_BACKEND = 'mboxemailbackend.EmailBackend'
#EMAIL_MBOX_FILE_PATH = 'sikteeri.mbox' # change this to a proper location #EMAIL_MBOX_FILE_PATH = 'sikteeri.mbox' # change this to a proper location


MEDIA_URL = 'http://localhost:12765'
TRUSTED_HOSTS = ['127.0.0.1'] TRUSTED_HOSTS = ['127.0.0.1']
7 changes: 3 additions & 4 deletions sikteeri/settings.py
Expand Up @@ -45,10 +45,7 @@
# Examples: "http://media.lawrence.com", "http://example.com/media/" # Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = '' MEDIA_URL = ''


# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a STATIC_URL = '/static/'
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'


# Additional locations of static files # Additional locations of static files
STATICFILES_DIRS = ( STATICFILES_DIRS = (
Expand Down Expand Up @@ -110,6 +107,8 @@


MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage' MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'


USE_X_FORWARDED_HOST = True

from local_settings import * from local_settings import *


# Is this the right way to do this? # Is this the right way to do this?
Expand Down

0 comments on commit a13d9bc

Please sign in to comment.