8000 Add example startup script (#1146) · johnmanong/python-docs-samples@d9adb63 · GitHub
[go: up one dir, main page]

Skip to content

Commit d9adb63

Browse files
buserpJon Wayne Parrott
authored andcommitted
Add example startup script (GoogleCloudPlatform#1146)
* Create openapi-appengine.yaml * Add comment to openapi.yaml about deploying on App Engine. Remove openapi-appengine.yaml. * Add query string authentication option to Endpoints clients. * Fix bracket line spacing. * Add openapi-appengine.yaml file for App Engine deployments. * Remove alternative auth scheme. * Change cloud.goog to appspot.com * Add simple IAP app for GCE. * Add hostname to example app's response. * Update IAP example backend and requirements. * Remove unnecessary '/healthz' endpoint, move constants after imports. * Fix lint * Add example startup scripts.
1 parent 1cd911d commit d9adb63

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

iap/example_startup_script.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apt-get -y install git
2+
apt-get -y install virtualenv
3+
git clone https://github.com/GoogleCloudPlatform/python-docs-samples
4+
cd python-docs-samples/iap
5+
virtualenv venv
6+
source venv/bin/activate
7+
pip install -r requirements.txt
8+
cat example_gce_backend.py |
9+
sed -e "s/YOUR_BACKEND_SERVICE_ID/$(gcloud compute backend-services describe my-backend-service --global --format="value(id)")/g" |
10+
sed -e "s/YOUR_PROJECT_ID/$(gcloud config get-value account | tr -cd "[0-9]")/g" > real_backend.py
11+
gunicorn real_backend:app -b 0.0.0.0:80

0 commit comments

Comments
 (0)
0