私は GAE の試用版を使用してアプリをデプロイしようとしています。これまでのところ、Python 3.6 を使用した柔軟な環境用のカスタム設定を含む app.yaml を作成することに成功しています。
しかし、アプリをデプロイすると、アプリは正常にビルドされますが、次のエラーが発生し続けます。
サービス [デフォルト] を更新しています (数分かかる場合があります)...失敗しました。エラー: (gcloud.app.deploy) エラー応答: [9] アプリケーション起動エラー: /bin/sh: 1: exec: gunicorn: 見つかりません
以下は私のプロジェクト内のファイルのフォルダー階層です。
app.yamlのコードに従う
env: flex
runtime: custom
api_version: 1
entrypoint: gunicorn -b :$PORT main:app
runtime_config:
python_version: 3.6
#handlers:
#- url: /SmsResponse
# script: Twilio_Routing.RecivedSms
#
#- url: /CallResponse
# script: Twilio_Routing.ReceivedCall
私は確かに何かを見逃しているので、ここで助けていただければ本当にありがたいです。Gitリポジトリへのリンク
要件.txt
Flask==0.10.1
gunicorn==19.3.0
twilio==6.8.4
Dockerファイル
FROM gcr.io/google-appengine/python
LABEL python_version=python3.6
RUN virtualenv --no-download /env -p python3.6
# Set virtualenv environment variables. This is equivalent to running
# source /env/bin/activate
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
# Copy the application's requirements.txt and run pip to install all
# dependencies into the virtualenv.
ADD requirements.txt requirements.txt
RUN pip install -r requirements.txt
ADD . /app/
#CMD gunicorn -b :$PORT main:app
ENTRYPOINT [ "python", "Twilio_Routing.py" ]
PS requirements.txt を変更した後、エラー 502 Bad Gateway が発生します。
サービスが正常に実行されたことを示すログ。
017-12-25 01:29:03 default[20171224t212610] * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
2017-12-25 01:29:03 default[20171224t212610] * Restarting with stat
2017-12-25 01:29:03 default[20171224t212610] * Debugger is active!
2017-12-25 01:29:03 default[20171224t212610] * Debugger PIN: 134-103-452
2017-12-25 01:29:17 default[20171224t212610] * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
2017-12-25 01:29:17 default[20171224t212610] * Restarting with stat
2017-12-25 01:29:17 default[20171224t212610] * Debugger is active!
2017-12-25 01:29:17 default[20171224t212610] * Debugger PIN: 134-103-452
誰かgitで私のコードを見て、何が足りないのか教えてもらえますか?
ベストアンサー1
私の場合、エラーはgunicornがrequirements.txt
Flask==1.0.2
gunicorn==19.9.0
注記:
OPがこのフラグを追加したのがわかります。これは、他のユーザーが遭遇する可能性のある問題に対処するためです。exec: gunicorn: not found