Create an app setup script

I'm not sure if this covers everything so I'd like to get another pair of eyes on it. At the very least it creates a local database, migrates it, and installs the bundle.