我正在尝试使用Google App Engine部署Django应用程序。
我的app.yaml文件:
# [START runtime]
runtime: python
api_version: 1
threadsafe: true
env: flex
entrypoint: gunicorn -b :$PORT wsgi
runtime_config:
python_version: 3.4
env_variables:
CLOUDSQL_CONNECTION_NAME: ugram-mysql
CLOUDSQL_USER: root
handlers:
- url: /
script: wsgi.application
# [END runtime]
但是当我运行gcloud app deploy
时,app部署正在运行(5分钟),但是我收到错误:
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
/bin/sh: 1: exec: gunicorn: not found
但已经安装了gunicorn
mysupers-beta:~$ gunicorn
usage: gunicorn [OPTIONS] [APP_MODULE]
gunicorn: error: No application module specified.
答案 0 :(得分:12)
检查gunicorn==19.7.1
中是否有requirements.txt
。
答案 1 :(得分:1)
您需要将gunicorn添加到您的requirements.txt文件中。