A sleeping competition app, at zscore.benkraft.org.
git clone email@example.com:sleepers-anonymous/zscore.git ; cd zscore
make deps(If you really don't want to deploy ever, you can just do
make serve, then go to
Deploying to prod
zScore runs on Google App Engine.
- Ask someone for access to the GCP project.
- Create a
zscore/secrets.pyfile with a
SECRET_KEYsetting (ask someone for the value).
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.
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 ./manage.py shell_plus to start a shell.