Skip to content

Commit

Permalink
Update deployment scripts and default settings
Browse files Browse the repository at this point in the history
  • 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
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Django==1.4.0
gunicorn==0.14.2
psycopg2==2.4.5
1 change: 0 additions & 1 deletion sikteeri/local_settings.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -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']
7 changes: 3 additions & 4 deletions sikteeri/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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?
Expand Down

0 comments on commit a13d9bc

Please sign in to comment.