-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
- [email protected]
- [email protected] - (pwd: hopstar) Used for technical emails like twitter
- [email protected] (pwd: hopstar) Used for customer support
- [email protected] (pwd: hopstart) Used for potential customer inquries
barleyboard (pwd:hopstar) - this is hooked up to the [email protected]
http://help.djangozoom.com/help/kb/getting-started/uploading-media DjangoZoom recomeends using Amazon S3 and django-storages to store media an uploaded files. This looks pretty easy. You need to include 2 django apps
django-storages
boto
and add this to settings
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
Then you will need to modify your file fields. See link on docs page for an example of this.
I have deployed a dev site at dev.barleyboard.com on gauss. It is using a sqlite database and a virtualenv call ~/envs/bbenv/
Here is my apache config for it.
<VirtualHost 173.255.213.55>
LogLevel debug
ServerName dev.barleyboard.com
WSGIDaemonProcess bb python-path=/home/wilblack/envs/bbenv/lib/python2.6/site-packages
WSGIProcessGroup bb
WSGIScriptAlias / /home/wilblack/django-projects/kegtv2/apache/django.wsgi
<Directory /home/wilblack/django-projects/kegtv2/apache>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
The "bb" in WSGIDaemonProcess and WSGIProcessGroup can be anything you want.
Then I had to create the django.wsgi script. I put this in django-projects/kegtv2/apache/
import os, sys
from os.path import abspath, dirname, join
path = abspath(join(dirname(__file__), "../../"))
if path not in sys.path:
sys.path.append(path)
path = abspath(join(dirname(__file__), "../"))
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'kegtv2.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
I am not sure that I need both path's appended but it did not work when I just used the first append.
For static media I followed django's recommendations here (https://docs.djangoproject.com/en/1.3/howto/static-files/). Here is my local_settings.py showing my config.
DEBUG = True
STATIC_URL = "http://173.255.213.55/wb/media/barleyboard/static/"
STATIC_ROOT = "/home/wilblack/django-projects/kegtv2/static/"
TO get all the media into the static directory I had to run a ./manage.py collectstatic I served up the media through an existing media server I had set up on gauss. To do this I made a symbolic in ~/http_media/barleyboard to kegtv2/static and named it static.