Skip to content

Instantly share code, notes, and snippets.

@diniremix
Last active April 4, 2017 18:31
Show Gist options
  • Save diniremix/2aa7eda6da6c97685874107c095d3881 to your computer and use it in GitHub Desktop.
Save diniremix/2aa7eda6da6c97685874107c095d3881 to your computer and use it in GitHub Desktop.
gcloud recipes

config gae php

--php_executable_path=/usr/bin/php-cgi

clone repo from google cloud sdk hosted (aka github, bitbucket, etc)

  • gcloud auth list
  • gcloud config set project PROJECT
  • gcloud auth login
  • gcloud init YOUR_REPO_ID
  • cd YOUR_REPO_ID/default

component list

  • gcloud components list
  • gcloud components update app
  • gcloud preview app deploy .
  • gcloud --project=[project-id] preview app deploy -q app.yaml

upload your repo to Google Cloud

clone repo using git

git clone https://source.developers.google.com/p/YOUR_REPO_ID/r/default CUSTOM_REPO_NAME --config credential.helper=gcloud.cmd

disabling updates

--skip_sdk_update_check --disable_update_check (old version)

running the app (examples)

  • dev_appserver.py --port=9090 myapp/
  • dev_appserver.py --port=9090 --php_executable_path=/usr/bin/php-cgi myapp/
  • dev_appserver.py --skip_sdk_update_check=yes --port=9090 --admin_port=8000 --php_executable_path=/usr/bin/php-cgi myapp/

Uploading the app

  • appcfg.py update myapp/

download source from GAE

  • appcfg.py download_app -A [APP-ID] -V [VERSION] [FOLDER_OUTPUT]

rollback

  • appcfg.py rollback myapp/

download database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment