Commits

Jiangge Zhang  committed fc74fb2 Merge

Merged in feature/procfile (pull request #1)

Add Procfile for Development

  • Participants
  • Parent commits 82f952e, 1626149

Comments (0)

Files changed (6)

File .env.default

+PASSWOOD_DATADIR=/tmp/passwood-db
 docs/_build
 
 # App
+.env
 dev.cfg
+web: python manage.py runserver
+postgresql: [ -d $PASSWOOD_DATADIR ] || (mkdir $PASSWOOD_DATADIR && initdb -D $PASSWOOD_DATADIR -E utf-8) && postgres -D $PASSWOOD_DATADIR -k $PASSWOOD_DATADIR
 Clone the source and modify the configuration::
 
     (passwood-env) $ git clone git@bitbucket.org:tonyseek/passwood.git
+    (passwood-env) $ cp .env.default .env
+    (passwood/dev) $ vim .env  # modify for your environment
     (passwood-env) $ cp passwood/dev.cfg.example passwood/dev.cfg
-    (passwood/dev) $ vim passwood/dev.cfg
+    (passwood/dev) $ vim passwood/dev.cfg  # modify for your environment
 
 Install the dependencies::
 
     (passwood-env) $ npm install  # install assets compilers
     (passwood-env) $ bower install  # install assets
 
+Start the devlopment server::
+
+    (passwood-env) $ honcho start
+
 Initialize the database and user account::
 
     (passwood-env) $ ./manage.py syncdb -dv  # destory and create db
     (passwood-env) $ ./manage.py adduser  # create first user
 
-Start the devlopment server::
-
-    (passwood-env) $ ./manage.py runserver
+Finally, open your browser and go to ``http://localhost:5000`` .
 
 
 .. _virtualenv: http://www.virtualenv.org/

File passwood/dev.cfg.example

 DEBUG = True
 SECRET_KEY = "secret-key"
 
-SQLALCHEMY_DATABASE_URI = "sqlite:////tmp/passwood-dev.sqlite"
+# SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://username@/postgres?host=/tmp/passwood-db"
+# SQLALCHEMY_DATABASE_URI = "sqlite:////tmp/passwood-dev.sqlite"
 SQLALCHEMY_ECHO = DEBUG
 
 MAIL_DEFAULT_SENDER = "noreply@example.com"

File requirements.txt

 jsmin==2.0.8
 passlib==1.6.1
 pep8==1.4.6
+psycopg2==2.5.2
 py==1.4.19
 pytest==2.5.1
 pytest-cache==1.0