Skip to content
Browse files

Run syncdb/migrate/createadmin from post-staging hook

  • Loading branch information...
1 parent 5389ee7 commit 1a2081fe4d9cdd518fda9f0910f512abe54fc981 @jandubois jandubois committed Sep 16, 2011
Showing with 10 additions and 9 deletions.
  1. +2 −9 README.md
  2. +5 −0 setup.sh
  3. +3 −0 stackato.yml
View
11 README.md
@@ -13,15 +13,8 @@ the Django admin URL at ``http://gtd.stackato.local/admin/``.
## Deploying to Stackato
+ # Change the admin password in setup.sh to a non-default value
stackato push -n
-
- stackato run gtd python manage.py syncdb --noinput
- stackato run gtd python manage.py migrate --noinput
-
- # Create the admin user
- stackato run gtd python manage.py createsuperuser --username=admin --email=admin@mydomain.com --noinput
- stackato run gtd python manage.py changepassword2 admin secret123
-
# Visit http://gtd.stackato.local/; go to /admin/ to add tasks, projects and contexts.
## Want to use MySQL?
@@ -33,4 +26,4 @@ changes before pushing your app:
* In settings.py, replace `django.db.backends.postgresql_psycopg2` with
`django.db.backends.mysql`
* In settings.py, replace `vcap_services['postgresql-8.4'][0]` with
- `vcap_services['mysql-5.1'][0]`
+ `vcap_services['mysql-5.1'][0]`
View
5 setup.sh
@@ -0,0 +1,5 @@
+python manage.py syncdb --noinput
+python manage.py migrate --noinput
+# Create the admin user
+python manage.py createsuperuser --username=admin --email=admin@mydomain.com --noinput
+python manage.py changepassword2 admin secret123
View
3 stackato.yml
@@ -5,6 +5,9 @@ mem: 64M
env:
DJANGO_SETTINGS_MODULE: settings
+hooks:
+ post-staging: sh -x ./setup.sh
+
services:
postgresql: postgresql-gtd

0 comments on commit 1a2081f

Please sign in to comment.
Something went wrong with that request. Please try again.