Controlling web2py development, qa and production app staging

68 Views Asked by At

my intent is to develop a webapp using web2py locally on my local machine. Once I complete my changes, I would like to do a local git push and then go to my QA machine and do a git pull. Once satisfied, I would finally do a git pull into production.

My questions are:

How should I initially download web2py and set it up as a git repo so that I can commit and push locally and then pull on my remote machine?

A related question is how should I install pyDAL locally (and then remotely).

1

There are 1 best solutions below

0
On

I think the book Killer Web Development gives us the formula for creating and committing an app in a development environment.

Of course there are other things which will vary between environments such as database authentication and web server setup.

For instance, to authenticate against different databases, you can use something similar to the default code in db.py:

myconf = AppConfig(reload=True)

if not request.env.web2py_runtime_gae:
    # ---------------------------------------------------------------------
    # if NOT running on Google App Engine use SQLite or other DB
    # ---------------------------------------------------------------------
    db = DAL(myconf.get('db.uri'),
             pool_size=myconf.get('db.pool_size'),
             migrate_enabled=myconf.get('db.migrate'),
             check_reserved=['all'])
else:
    # ---------------------------------------------------------------------
    # connect to Google BigTable (optional 'google:datastore://namespace')
    # ---------------------------------------------------------------------
    db = DAL('google:datastore+ndb')