Skip to content

Commit 7f90a07

Browse files
author
Jon Wayne Parrott
authored
Update App Engine Flexible samples for beta 2 (GoogleCloudPlatform#563)
2 parents 5a8e12f + ce333fb commit 7f90a07

File tree

50 files changed

+91
-395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+91
-395
lines changed

appengine/flexible/analytics/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
runtime: python
2-
vm: true
2+
env: flex
33
entrypoint: gunicorn -b :$PORT main:app
44

55
runtime_config:

appengine/flexible/cloudsql/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
runtime: python
2-
vm: true
2+
env: flex
33
entrypoint: gunicorn -b :$PORT main:app
44

55
runtime_config:

appengine/flexible/cloudsql/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import socket
1919

2020
from flask import Flask, request
21-
from flask.ext.sqlalchemy import SQLAlchemy
21+
from flask_sqlalchemy import SQLAlchemy
2222

2323

2424
app = Flask(__name__)

appengine/flexible/datastore/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ When running locally, you can use the [Google Cloud SDK](https://cloud.google.co
1414

1515
$ gcloud init
1616

17-
Set the ``GCLOUD_PROJECT`` environment variable to your Project ID before starting your application:
17+
Starting your application:
1818

19-
$ export GCLOUD_PROJECT=[your-project-id]
2019
$ python main.py
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
runtime: python
2-
vm: true
2+
env: flex
33
entrypoint: gunicorn -b :$PORT main:app
44

55
runtime_config:
66
python_version: 3
7-
8-
# [START env_variables]
9-
env_variables:
10-
GCLOUD_PROJECT: your-project-id
11-
# [END env_variables]

appengine/flexible/datastore/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def is_ipv6(addr):
3636
# [START example]
3737
@app.route('/')
3838
def index():
39-
ds = datastore.Client(os.environ['GCLOUD_PROJECT'])
39+
ds = datastore.Client()
4040

4141
user_ip = request.remote_addr
4242

appengine/flexible/disk/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
runtime: python
2-
vm: true
2+
env: flex
33
entrypoint: gunicorn -b :$PORT main:app
44

55
runtime_config:

appengine/flexible/disk/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def is_ipv6(addr):
3434
# [START example]
3535
@app.route('/')
3636
def index():
37-
instance_id = os.environ.get('GAE_MODULE_INSTANCE', '1')
37+
instance_id = os.environ.get('GAE_INSTANCE', '1')
3838

3939
user_ip = request.remote_addr
4040

appengine/flexible/django_cloudsql/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# [START runtime]
22
runtime: python
3-
vm: true
3+
env: flex
44
entrypoint: gunicorn -b :$PORT mysite.wsgi
55

66
beta_settings:

appengine/flexible/endpoints/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
runtime: python
2-
vm: true
2+
env: flex
33
entrypoint: gunicorn -b :$PORT main:app
44

55
runtime_config:

0 commit comments

Comments
 (0)