Skip to content

Commit

Permalink
Merge pull request #12 from hcholab/flask-debug-optional
Browse files Browse the repository at this point in the history
Turn on FLASK_DEBUG only in Cloud Run development by default
  • Loading branch information
dinvlad authored Nov 30, 2023
2 parents 939f768 + fb9eecf commit 2c9b6b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ steps:
- '--region=$_DEPLOY_REGION'
- '--min-instances=1'
- '--quiet'
- '--set-env-vars=CLOUD_RUN=True,SERVICE_URL=https://$_SERVICE_NAME-$_DEPLOY_REGION.a.run.app'
- '--set-env-vars=CLOUD_RUN=True,SERVICE_URL=https://$_SERVICE_NAME-$_DEPLOY_REGION.a.run.app,FLASK_DEBUG=$_FLASK_DEBUG'
id: Deploy
entrypoint: gcloud
images:
Expand All @@ -38,6 +38,7 @@ substitutions:
_LABELS: gcb-trigger-id=44d26102-694b-457c-afaf-b086e4d866be
_TRIGGER_ID: 44d26102-694b-457c-afaf-b086e4d866be
_DEPLOY_REGION: us-central1
_FLASK_DEBUG: development
_GCR_HOSTNAME: us.gcr.io
_PLATFORM: managed
tags:
Expand Down
1 change: 0 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
port = int(sys.argv[1]) if len(sys.argv) > 1 else 5000

os.environ["FLASK_APP"] = "src"
os.environ["FLASK_DEBUG"] = "development"
src.create_app().run(port=port)

0 comments on commit 2c9b6b3

Please sign in to comment.