Skip to content

Commit

Permalink
Modify the markup to be closer to Markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
akumria committed Jun 6, 2012
1 parent aaa05b3 commit e55f37a
Showing 1 changed file with 51 additions and 38 deletions.
89 changes: 51 additions & 38 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,55 @@ Currently there is support for:
Initial (local) install.
------------------------

- clone this project
- $ git clone https://github.com/akumria/django-paas
- $ cd django-paas
- clone this project

- setup your virtual environment (one time)
- $ virtualenv --no-site-packages env
- $ virtualenv --relocatable env
- $ source env/bin/activate
$ git clone https://github.com/akumria/django-paas
$ cd django-paas

- install dependancies
- (env)$ pip install -r requirements.txt
- setup your virtual environment (one time)

- generate a secret key and save it
- (env)$ ./manage.py gensecretkey
- this will output 'Please create secret.py and specify a SECRET_KEY within.' but this is OK
- (env)$ git add pass/settings/secret.py
- (env)$ git commit -m "Generated secret key"
$ virtualenv --no-site-packages env
$ virtualenv --relocatable env
$ source env/bin/activate

- rename the project
- (env)$ git mv paas to <myproject>
- install dependancies

- edit manage.py
- change 'paas.settings' to '<myproject>.settings'
- (env)$ git add manage.py
(env)$ pip install -r requirements.txt

- edit <myproject>/settings/base.py
- specify appropriate value for ADMINS=
- (env)$ git add .
- generate a secret key and save it

- (env)$ git commit -m "Updated to name to be <myproject>"
(env)$ ./manage.py gensecretkey

- this will output 'Please create secret.py and specify a SECRET_KEY within.' but this is OK

(env)$ git add pass/settings/secret.py
(env)$ git commit -m "Generated secret key"

- rename the project

(env)$ git mv paas to <myproject>

- edit manage.py

- change 'paas.settings' to '<myproject>.settings'

(env)$ git add manage.py

- edit <myproject>/settings/base.py

- specify appropriate value for ADMINS=

(env)$ git add .
(env)$ git commit -m "Updated to name to be <myproject>"

You will now have a local installation, using sqllite where you can add
additional applications and test things locally.

- run things!
- (env)$ ./manage.py syncdb
- (env)$ ./manage.py migrate
- (env)$ ./manage.py runserver
- run things!

(env)$ ./manage.py syncdb
(env)$ ./manage.py migrate
(env)$ ./manage.py runserver

Deploying to Heroku
-------------------
Expand All @@ -66,37 +77,39 @@ Deploying to Heroku

3. Login

- (env)$ heroku login
(env)$ heroku login

4. Create the remote Heroku stack

- (env)$ heroku create --stack cedar
(env)$ heroku create --stack cedar
- Note down the URL generated, this is where your app will live (for now)

5. Upload the code remotely

- (env)$ git push heroku master
(env)$ git push heroku master
- Note this will take a while

6. Export the Django settings (locally and remotely)

- (env)$ export DJANGO_SETTINGS_MODULE=paas.settings.heroku # change to <myproject> if you have renamed as above
- (env)$ heroku config:add DJANGO_SETTINGS_MODULE=paas.settings.heroku # likewise change to <myproject>
(env)$ export DJANGO_SETTINGS_MODULE=paas.settings.heroku # change to <myproject> if you have renamed as above
(env)$ heroku config:add DJANGO_SETTINGS_MODULE=paas.settings.heroku # likewise change to <myproject>

7. Add a remote Heroku database and perform setup

- (env)$ heroku addons:add heroku-postgresql:dev
(env)$ heroku addons:add heroku-postgresql:dev
- Note the line 'Attached as HEROKU_POSTGRESQL_FOO' # note it is unlikely to be FOO
- (env)$ heroku pg:promote HEROKU_POSTGRESQL_FOO
- (env)$ heroku run python manage.py syncdb
- (env)$ heroku run python manage.py migrate

(env)$ heroku pg:promote HEROKU_POSTGRESQL_FOO
(env)$ heroku run python manage.py syncdb
(env)$ heroku run python manage.py migrate

8. Visit your site

- (env)$ heroku open
(env)$ heroku open

Deploying to a generic PaaS
---------------------------
- create a deployment environment file (e.g. paas/settings/staging.py)

- create a deployment environment file (e.g. paas/settings/generic.py)
- specify your DB
- specify your environment ADMINS=

0 comments on commit e55f37a

Please sign in to comment.