Skip to content

Commit

Permalink
add a few more instructions to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
natea committed Dec 12, 2011
1 parent 5e6295d commit cf346bd
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 13 deletions.
55 changes: 43 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,49 @@ Get the MediaThread code and submodules::
$ git submodule init
$ git submodule update

Deploy it::
Add to your mediathread/deploy_specific/settings.py::

EXTRA_INSTALLED_APPS = (
'django_stackato',
)

# ## Pull in CloudFoundry's production settings
if 'VCAP_SERVICES' in os.environ:
import json
vcap_services = json.loads(os.environ['VCAP_SERVICES'])
# XXX: avoid hardcoding here
# srv = vcap_services['postgresql-8.4'][0]
srv = vcap_services['mysql-5.1'][0]
cred = srv['credentials']
DATABASES = {
'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': cred['name'], # Or path to database file if using sqlite3.
'USER': cred['user'], # Not used with sqlite3.
'PASSWORD': cred['password'], # Not used with sqlite3.
'HOST': cred['hostname'], # Set to empty string for localhost. Not used with sqlite3.
'PORT': cred['port'], # Set to empty string for default. Not used with sqlite3.
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'mediathread', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}

**Note:** You'll need to make a file `__init__.py` in the `deploy_specific dir` in order for the files to be loaded.

Try it out!
-----------

Login to MediaThread by pointing your browser at http://mediathread.stackato.local and use these login credentials (can be changed in stackato.yml)::

$ stackato target api.stackato.local
$ stackato login (you will have had to register a user first)
$ stackato push -n

Subsequent deploys::

$ stackato update -n

Login to MediaThread::

Point browser at http://mediathread.stackato.local
un: admin
pw: secret123
2 changes: 1 addition & 1 deletion mediathread
Submodule mediathread updated from 691677 to 8fe270

0 comments on commit cf346bd

Please sign in to comment.