Skip to content

Instantly share code, notes, and snippets.

@ithinkihaveacat
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save ithinkihaveacat/b7b2e10187b9c8bdc795 to your computer and use it in GitHub Desktop.

Select an option

Save ithinkihaveacat/b7b2e10187b9c8bdc795 to your computer and use it in GitHub Desktop.
Simple app.yaml for use with https://github.com/google/web-starter-kit
application: myproject
version: 0
runtime: php
api_version: 1
threadsafe: false
handlers:
- url: /$
static_files: index.html
upload: index.html
- url: /(.*)
static_files: \1
upload: .*
#!/usr/bin/env bash
gulp
cd dist
cp ../app.yaml .
appcfg.py --oauth2 update .

Create the project

In Google Developers Console:

  1. Create new project (myproject).
  2. Create a new git repository. (You can use the one described at Source Code | Browse.)

Install web-starter-kit dependencies

See https://github.com/google/web-starter-kit/blob/master/docs/install.md.

Install Google Cloud SDK

See https://cloud.google.com/sdk/.

Download source code

# In your git repo
git remote add web-starter-kit https://github.com/google/web-starter-kit.git
git remote add app-yaml https://gist.github.com/b7b2e10187b9c8bdc795.git # this gist
git fetch --all --tags
git merge web-starter-kit/master # or git merge v0.5.2 to merge a tag
git merge app-yaml/master

Download dependencies and generate assets

npm install
gulp # "npm link gulp" if error

Deploy

cp app.yaml dist
cd dist
appcfg.py --oauth2 update . # "rm ~/.appcfg_oauth2_tokens" if error

If the update fails, check that your application in app.yaml matches the project id in the Developers Console.

Other

Use gulp serve for local development.

The included deploy script runs gulp and deploys to GAE.

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