Sleeping competition app
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A sleeping competition app, at

Dev setup

  1. git clone ; cd zscore
  2. make deps (If you really don't want to deploy ever, you can just do make dev_deps.)
  3. ./ migrate
  4. make serve, then go to localhost:8000

Deploying to prod

zScore runs on Google App Engine.

  1. Ask someone for access to the GCP project.
  2. Create a zscore/ file with a SECRET_KEY setting (ask someone for the value).
  3. make deploy.

If you screw something up, head over to the Google Cloud Console, click on "App Engine", then "Versions", and move traffic back to the previous version.

To see logs, go to the Google Cloud Console, click on "Logging". request_log is what it sounds like; stderr has error tracebacks.

Advanced options

To deploy only static assets (which go in the zscore-static bucket on Google Cloud Storage), make gcs_deploy. To deploy only dynamic files (which go to App Engine), make gae_deploy. These two are independent; make deploy runs both.

To run your dev server against the live DB, grab the Cloud SQL proxy and put it on your path in a file called cloud_sql_proxy. Follow the instructions at that link to create a service account for your dev server, and save the key in .cloud-sql.key. Now run make proxy to start the proxy, and PROD_DB=1 ./ shell_plus to start a shell.