【发布时间】:2019-06-17 10:12:55
【问题描述】:
我正在尝试使用 MySQL 作为数据库创建示例 Django 应用程序,当我尝试在 GCP 上部署的同一应用程序出现 500 错误时,它在本地工作正常。 我在 GCP 中创建了 sql server 并使用了相同的设置
它无法找到gunicorn,但我已在requirments.txt 中指定了所有这些。
2019-01-19 07:42:57 default[20190119t130429] "GET /admin HTTP/1.1" 500
2019-01-19 07:42:58 default[20190119t130429] /bin/sh: 1: exec: gunicorn: not found
2019-01-23 17:41:21 default[20190119t130429] "GET /admin HTTP/1.1" 500
2019-01-23 17:41:22 default[20190119t130429] /bin/sh: 1: exec: gunicorn: not found
2019-01-23 18:36:00 default[20190123t235752] "GET /admin HTTP/1.1" 500
2019-01-23 18:36:00 default[20190123t235752] /bin/sh: 1: exec: gunicorn: not found
2019-01-23 18:36:01 default[20190123t235752] "GET /favicon.ico HTTP/1.1" 500
2019-01-23 18:36:02 default[20190123t235752] /bin/sh: 1: exec: gunicorn: not found
2019-01-23 18:36:20 default[20190123t235752] "GET /admin HTTP/1.1" 500
2019-01-23 18:36:20 default[20190123t235752] /bin/sh: 1: exec: gunicorn: not found
2019-01-23 18:36:21 default[20190123t235752] "GET /favicon.ico HTTP/1.1" 500
2019-01-23 18:36:21 default[20190123t235752] /bin/sh: 1: exec: gunicorn: not found
**app.yaml**
runtime: python37
entrypoint: gunicorn -b :$PORT sqlreco.wsgi
#threadsafe: yes
handlers:
- url: /images
static_dir: static/images
http_headers:
Access-Control-Allow-Origin: '*'
runtime_config:
python_version: 3
**requirnaments.txt**
Django==2.1.5
djangorestframework==3.9.1
mysql==0.0.2
mysqlclient==1.4.1
pytz==2018.9
gunicorn==19.8.1
【问题讨论】:
标签: python mysql django google-app-engine google-cloud-platform