Reputation:
What I do wrong
I just try to upload my python flask app on google cloud app engine
gcloud config set project project-85474158
gcloud app deploy
FOLDER STRUCTURE
MY_APP
|
|__app.yaml
|__requirements.txt
|__setup.py
runtime: python
env: flex
entrypoint: gunicorn -b :$PORT main:setup
runtime_config:
python_version: 3
api_version: 1
instance_class: B8
basic_scaling:
max_instances: 2
idle_timeout: 10m
Flask==0.12.2
gunicorn==19.6.0
import logging
from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return 'Hello Youtube v2'
if __name__ == '__main__':
app.run(host='127.0.0.1', port=5000, debug=True)
Upvotes: 1
Views: 919
Reputation: 9721
You have env: flex
which means you are trying to use GAE Flexible. There are a few things in your code incompatible with Flexible:
You cannot specify instance_class: B8
. Instance classes are from GAE Standard. Instead, leave it out entirely or specify resources
You cannot specify basic_scaling
. This is also from Standard. Instead specify automatic_scaling
or manual_scaling
.
You are running gunicorn with main:setup, but you are using object app in module setup, so you should use setup:app
.
Upvotes: 1