diff --git a/container_engine/django_tutorial/requirements.txt b/container_engine/django_tutorial/requirements.txt index 163a26d7707b..377a14aab47b 100644 --- a/container_engine/django_tutorial/requirements.txt +++ b/container_engine/django_tutorial/requirements.txt @@ -1,4 +1,4 @@ Django==1.9.2 mysqlclient==1.3.7 -wheel==0.28.0 +wheel==0.29.0 gunicorn==19.4.5 diff --git a/managed_vms/analytics/.dockerignore b/managed_vms/analytics/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/analytics/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/analytics/Dockerfile b/managed_vms/analytics/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/analytics/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/analytics/app.yaml b/managed_vms/analytics/app.yaml index 9635bd7784b1..eb79bf8e1b9d 100644 --- a/managed_vms/analytics/app.yaml +++ b/managed_vms/analytics/app.yaml @@ -1,5 +1,9 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 #[START env] env_variables: diff --git a/managed_vms/analytics/main.py b/managed_vms/analytics/main.py index bdf24ec8164f..496497057623 100644 --- a/managed_vms/analytics/main.py +++ b/managed_vms/analytics/main.py @@ -59,6 +59,6 @@ def track_example(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) # [END app] diff --git a/managed_vms/cloudsql/.dockerignore b/managed_vms/cloudsql/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/cloudsql/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/cloudsql/Dockerfile b/managed_vms/cloudsql/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/cloudsql/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/cloudsql/app.yaml b/managed_vms/cloudsql/app.yaml index 183dd2eb9260..c2b0c5066649 100644 --- a/managed_vms/cloudsql/app.yaml +++ b/managed_vms/cloudsql/app.yaml @@ -1,5 +1,9 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 #[START env] env_variables: diff --git a/managed_vms/cloudsql/main.py b/managed_vms/cloudsql/main.py index b6c5d21697d4..1b22c31ad491 100644 --- a/managed_vms/cloudsql/main.py +++ b/managed_vms/cloudsql/main.py @@ -81,5 +81,5 @@ def index(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) diff --git a/managed_vms/datastore/.dockerignore b/managed_vms/datastore/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/datastore/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/datastore/Dockerfile b/managed_vms/datastore/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/datastore/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/datastore/app.yaml b/managed_vms/datastore/app.yaml index 2ce99560bb9d..1f8ff06ebfdb 100644 --- a/managed_vms/datastore/app.yaml +++ b/managed_vms/datastore/app.yaml @@ -1,5 +1,9 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 # [START env_variables] env_variables: diff --git a/managed_vms/datastore/main.py b/managed_vms/datastore/main.py index 052ffb1525f5..f4fd9bac4ad0 100644 --- a/managed_vms/datastore/main.py +++ b/managed_vms/datastore/main.py @@ -66,5 +66,5 @@ def index(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) diff --git a/managed_vms/disk/.dockerignore b/managed_vms/disk/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/disk/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/disk/Dockerfile b/managed_vms/disk/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/disk/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/disk/app.yaml b/managed_vms/disk/app.yaml index e8b73970590e..00539c11722c 100644 --- a/managed_vms/disk/app.yaml +++ b/managed_vms/disk/app.yaml @@ -1,2 +1,6 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 diff --git a/managed_vms/disk/main.py b/managed_vms/disk/main.py index 21f2d7ad1f3f..f470bf7aec06 100644 --- a/managed_vms/disk/main.py +++ b/managed_vms/disk/main.py @@ -43,5 +43,5 @@ def index(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) diff --git a/managed_vms/django_cloudsql/.dockerignore b/managed_vms/django_cloudsql/.dockerignore deleted file mode 100644 index 721c69878d7d..000000000000 --- a/managed_vms/django_cloudsql/.dockerignore +++ /dev/null @@ -1,20 +0,0 @@ -.dockerignore -Dockerfile -db.sqlite3 -__pycache__ -*.pyc -*.pyo -*.pyd -.Python -env -pip-log.txt -pip-delete-this-directory.txt -.tox -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -*.log -.git diff --git a/managed_vms/django_cloudsql/Dockerfile b/managed_vms/django_cloudsql/Dockerfile deleted file mode 100644 index de4954b27119..000000000000 --- a/managed_vms/django_cloudsql/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2015, Google, Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# [START docker] - -# The Google App Engine python runtime is Debian Jessie with Python installed -# and various os-level packages to allow installation of popular Python -# libraries. The source is on github at: -# https://github.com/GoogleCloudPlatform/python-docker -FROM gcr.io/google_appengine/python - -# Create a virtualenv for the application dependencies. -# # If you want to use Python 3, add the -p python3.4 flag. -RUN virtualenv /env - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. This ensures the application is executed within -# the context of the virtualenv and will have access to its dependencies. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -# Install dependencies. -ADD requirements.txt /app/requirements.txt -RUN /env/bin/pip install -r /app/requirements.txt - -# Add Application code -ADD . /app - -CMD gunicorn -b :$PORT mysite.wsgi -# [END docker] diff --git a/managed_vms/django_cloudsql/app.yaml b/managed_vms/django_cloudsql/app.yaml index 2fe2a8a12ba1..e52ae75b4e2c 100644 --- a/managed_vms/django_cloudsql/app.yaml +++ b/managed_vms/django_cloudsql/app.yaml @@ -1,14 +1,9 @@ -# This file specifies your Python application's runtime configuration -# including URL routing, versions, static file uploads, etc. See -# https://developers.google.com/appengine/docs/python/config/appconfig -# for details. - -# TODO: Enter your application id below. If you have signed up -# using cloud.google.com/console use the "project id" for your application -# id. # [START runtime] -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT mysite.wsgi +runtime_config: + python_version: 3 # [END runtime] diff --git a/managed_vms/django_cloudsql/requirements.txt b/managed_vms/django_cloudsql/requirements.txt index 163a26d7707b..377a14aab47b 100644 --- a/managed_vms/django_cloudsql/requirements.txt +++ b/managed_vms/django_cloudsql/requirements.txt @@ -1,4 +1,4 @@ Django==1.9.2 mysqlclient==1.3.7 -wheel==0.28.0 +wheel==0.29.0 gunicorn==19.4.5 diff --git a/managed_vms/hello_world/.dockerignore b/managed_vms/hello_world/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/hello_world/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/hello_world/Dockerfile b/managed_vms/hello_world/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/hello_world/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/hello_world/app.yaml b/managed_vms/hello_world/app.yaml index e8b73970590e..00539c11722c 100644 --- a/managed_vms/hello_world/app.yaml +++ b/managed_vms/hello_world/app.yaml @@ -1,2 +1,6 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 diff --git a/managed_vms/hello_world/main.py b/managed_vms/hello_world/main.py index 49963e00ffe9..7115570b5681 100644 --- a/managed_vms/hello_world/main.py +++ b/managed_vms/hello_world/main.py @@ -27,6 +27,6 @@ def hello(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) # [END app] diff --git a/managed_vms/hello_world_compat/.gitignore b/managed_vms/hello_world_compat/.gitignore deleted file mode 100644 index a65b41774ad5..000000000000 --- a/managed_vms/hello_world_compat/.gitignore +++ /dev/null @@ -1 +0,0 @@ -lib diff --git a/managed_vms/hello_world_compat/README.md b/managed_vms/hello_world_compat/README.md index debe68e135bb..51cbecc5363a 100644 --- a/managed_vms/hello_world_compat/README.md +++ b/managed_vms/hello_world_compat/README.md @@ -4,7 +4,7 @@ This sample demonstrates using [Python on Google App Engine Managed VMs](https:/ ### Running & deploying the sample -1. Requirements.txt is not automatically processed by Google App Engine Managed VMs. To install dependencies for this sample, run: +1. `requirements.txt` is automatically installed by the runtime when deploying, however, to run the sample locally you will need to install dependencies: $ pip install -t lib -r requirements.txt @@ -14,4 +14,4 @@ This sample demonstrates using [Python on Google App Engine Managed VMs](https:/ 3. Deploy the sample: - $ appcfg.py update -A your-app-id . + $ gcloud preview app deploy diff --git a/managed_vms/hello_world_compat/app.yaml b/managed_vms/hello_world_compat/app.yaml index 70f6bcf43ee1..5d8928f3e234 100644 --- a/managed_vms/hello_world_compat/app.yaml +++ b/managed_vms/hello_world_compat/app.yaml @@ -1,7 +1,5 @@ -version: 1 -runtime: python27 +runtime: python-compat vm: true -api_version: 1 threadsafe: true handlers: diff --git a/managed_vms/hello_world_compat/appengine_config.py b/managed_vms/hello_world_compat/appengine_config.py deleted file mode 100644 index 4fdc5d2b60fc..000000000000 --- a/managed_vms/hello_world_compat/appengine_config.py +++ /dev/null @@ -1,4 +0,0 @@ -from google.appengine.ext import vendor - -# Add any libraries installed in the "lib" folder. -vendor.add('lib') diff --git a/managed_vms/hello_world_django/.dockerignore b/managed_vms/hello_world_django/.dockerignore deleted file mode 100644 index accaf564035f..000000000000 --- a/managed_vms/hello_world_django/.dockerignore +++ /dev/null @@ -1,9 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ -db.sqlite3 diff --git a/managed_vms/hello_world_django/Dockerfile b/managed_vms/hello_world_django/Dockerfile deleted file mode 100644 index df150068f4ed..000000000000 --- a/managed_vms/hello_world_django/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT project_name.wsgi diff --git a/managed_vms/hello_world_django/README.md b/managed_vms/hello_world_django/README.md index 0249a0b18b7e..4eddd7965ee7 100644 --- a/managed_vms/hello_world_django/README.md +++ b/managed_vms/hello_world_django/README.md @@ -13,8 +13,8 @@ You can run locally using django's `manage.py`: Follow the standard deployment instructions in [the top-level README](../README.md). Google App Engine runs the application -using [gunicorn](http://gunicorn.org/) as defined by `CMD` in -[`Dockerfile`](Dockerfile). You can use a different WSGI container if you want, as +using [gunicorn](http://gunicorn.org/) as defined by `entrypoint` in +[`app.yaml`](app.yaml). You can use a different WSGI container if you want, as long as it listens for web traffic on port `$PORT` and is declared in [`requirements.txt`](requirements.txt). @@ -34,7 +34,7 @@ Then, we added a simple view in `hellworld.views`, added the app to `project_name.urls`. In order to deploy to Google App Engine, we created a simple -[`app.yaml`](app.yaml) and [`Dockerfile`](Dockerfile). +[`app.yaml`](app.yaml). ## Database notice diff --git a/managed_vms/hello_world_django/app.yaml b/managed_vms/hello_world_django/app.yaml index e8b73970590e..ec53e0e4f41b 100644 --- a/managed_vms/hello_world_django/app.yaml +++ b/managed_vms/hello_world_django/app.yaml @@ -1,2 +1,6 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT project_name.wsgi + +runtime_config: + python_version: 3 diff --git a/managed_vms/mailgun/.dockerignore b/managed_vms/mailgun/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/mailgun/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/mailgun/Dockerfile b/managed_vms/mailgun/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/mailgun/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/mailgun/app.yaml b/managed_vms/mailgun/app.yaml index f2616d79394c..62a65993bb23 100644 --- a/managed_vms/mailgun/app.yaml +++ b/managed_vms/mailgun/app.yaml @@ -1,5 +1,9 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 # [START env_variables] env_variables: diff --git a/managed_vms/mailgun/main.py b/managed_vms/mailgun/main.py index c2abde1df698..0ba388bccea0 100644 --- a/managed_vms/mailgun/main.py +++ b/managed_vms/mailgun/main.py @@ -80,6 +80,6 @@ def send_email(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) # [END app] diff --git a/managed_vms/memcache/.dockerignore b/managed_vms/memcache/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/memcache/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/memcache/Dockerfile b/managed_vms/memcache/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/memcache/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/memcache/app.yaml b/managed_vms/memcache/app.yaml index b820c326251e..419197141da7 100644 --- a/managed_vms/memcache/app.yaml +++ b/managed_vms/memcache/app.yaml @@ -1,5 +1,9 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 # [START config] beta_settings: diff --git a/managed_vms/memcache/main.py b/managed_vms/memcache/main.py index bd2f8f034f28..3b9bba3fbfcf 100644 --- a/managed_vms/memcache/main.py +++ b/managed_vms/memcache/main.py @@ -45,5 +45,5 @@ def index(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) diff --git a/managed_vms/pubsub/.dockerignore b/managed_vms/pubsub/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/pubsub/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/pubsub/Dockerfile b/managed_vms/pubsub/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/pubsub/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/pubsub/app.yaml b/managed_vms/pubsub/app.yaml index af5971a01b50..3eb01e3c2e18 100644 --- a/managed_vms/pubsub/app.yaml +++ b/managed_vms/pubsub/app.yaml @@ -1,5 +1,9 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 #[START env] env_variables: diff --git a/managed_vms/pubsub/main.py b/managed_vms/pubsub/main.py index a301a4b984a2..0daf8bb5ad13 100644 --- a/managed_vms/pubsub/main.py +++ b/managed_vms/pubsub/main.py @@ -69,6 +69,6 @@ def pubsub_push(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) # [END app] diff --git a/managed_vms/sendgrid/.dockerignore b/managed_vms/sendgrid/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/sendgrid/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/sendgrid/Dockerfile b/managed_vms/sendgrid/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/sendgrid/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/sendgrid/app.yaml b/managed_vms/sendgrid/app.yaml index 6703c64228a3..fed5cea9f2dd 100644 --- a/managed_vms/sendgrid/app.yaml +++ b/managed_vms/sendgrid/app.yaml @@ -1,5 +1,9 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 # [START env_variables] env_variables: diff --git a/managed_vms/sendgrid/main.py b/managed_vms/sendgrid/main.py index 02350be53473..2bee1c106994 100644 --- a/managed_vms/sendgrid/main.py +++ b/managed_vms/sendgrid/main.py @@ -59,6 +59,6 @@ def send_email(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) # [END app] diff --git a/managed_vms/sendgrid/requirements.txt b/managed_vms/sendgrid/requirements.txt index 4f2a7aeda2ac..a2d9f40f85a4 100644 --- a/managed_vms/sendgrid/requirements.txt +++ b/managed_vms/sendgrid/requirements.txt @@ -1,3 +1,3 @@ Flask==0.10.1 -sendgrid==1.6.20 +sendgrid==1.6.22 gunicorn==19.4.5 diff --git a/managed_vms/static_files/.dockerignore b/managed_vms/static_files/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/static_files/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/static_files/Dockerfile b/managed_vms/static_files/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/static_files/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/static_files/app.yaml b/managed_vms/static_files/app.yaml index e8b73970590e..00539c11722c 100644 --- a/managed_vms/static_files/app.yaml +++ b/managed_vms/static_files/app.yaml @@ -1,2 +1,6 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 diff --git a/managed_vms/static_files/main.py b/managed_vms/static_files/main.py index f99e2c956d89..4ae0c71a4dac 100644 --- a/managed_vms/static_files/main.py +++ b/managed_vms/static_files/main.py @@ -26,6 +26,6 @@ def hello(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) # [END app] diff --git a/managed_vms/storage/.dockerignore b/managed_vms/storage/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/storage/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/storage/Dockerfile b/managed_vms/storage/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/storage/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/storage/app.yaml b/managed_vms/storage/app.yaml index efb0c008246d..6f6f6d57c4b7 100644 --- a/managed_vms/storage/app.yaml +++ b/managed_vms/storage/app.yaml @@ -1,5 +1,9 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 #[START env] env_variables: diff --git a/managed_vms/storage/main.py b/managed_vms/storage/main.py index 74120ec4fc0f..b8f338b9372c 100644 --- a/managed_vms/storage/main.py +++ b/managed_vms/storage/main.py @@ -70,6 +70,6 @@ def upload(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) # [END app] diff --git a/managed_vms/twilio/.dockerignore b/managed_vms/twilio/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/twilio/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/twilio/Dockerfile b/managed_vms/twilio/Dockerfile deleted file mode 100644 index 64d56e4e8a3a..000000000000 --- a/managed_vms/twilio/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -CMD gunicorn -b :$PORT main:app diff --git a/managed_vms/twilio/app.yaml b/managed_vms/twilio/app.yaml index a2d6d551d6b6..e4d2cec9c416 100644 --- a/managed_vms/twilio/app.yaml +++ b/managed_vms/twilio/app.yaml @@ -1,5 +1,9 @@ -runtime: custom +runtime: python vm: true +entrypoint: gunicorn -b :$PORT main:app + +runtime_config: + python_version: 3 # [START env_variables] env_variables: diff --git a/managed_vms/twilio/main.py b/managed_vms/twilio/main.py index 57ccc40cc81e..3bbe2caec94a 100644 --- a/managed_vms/twilio/main.py +++ b/managed_vms/twilio/main.py @@ -75,6 +75,6 @@ def receive_sms(): if __name__ == '__main__': # This is used when running locally. Gunicorn is used to run the - # application on Google App Engine. See CMD in Dockerfile. + # application on Google App Engine. See entrypoint in app.yaml. app.run(host='127.0.0.1', port=8080, debug=True) # [END app] diff --git a/managed_vms/websockets/.dockerignore b/managed_vms/websockets/.dockerignore deleted file mode 100644 index c346979e48f1..000000000000 --- a/managed_vms/websockets/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -.dockerignore -Dockerfile -.git -.hg -.svn -env -*.pyc -__pycache__ diff --git a/managed_vms/websockets/Dockerfile b/managed_vms/websockets/Dockerfile deleted file mode 100644 index c1f36243cd4d..000000000000 --- a/managed_vms/websockets/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM gcr.io/google_appengine/python - -# Change the -p argument to use Python 2.7 if desired. -RUN virtualenv /env -p python3.4 - -# Set virtualenv environment variables. This is equivalent to running -# source /env/bin/activate. -ENV VIRTUAL_ENV /env -ENV PATH /env/bin:$PATH - -ADD requirements.txt /app/ -RUN pip install -r requirements.txt -ADD . /app/ - -# Use a special gunicorn worker class to support websockets. -CMD gunicorn -b :$PORT -b :65080 -k flask_sockets.worker main:app diff --git a/managed_vms/websockets/app.yaml b/managed_vms/websockets/app.yaml index 069482c5cce3..bdbc261e352e 100644 --- a/managed_vms/websockets/app.yaml +++ b/managed_vms/websockets/app.yaml @@ -1,6 +1,12 @@ -runtime: custom +runtime: python vm: true +# Use a special gunicorn worker class to support websockets. +entrypoint: gunicorn -b :$PORT -b :65080 -k flask_sockets.worker main:app + +runtime_config: + python_version: 3 + # [START network] network: forwarded_ports: