【发布时间】:2018-04-24 15:51:12
【问题描述】:
我在谷歌控制台上部署开发的 django 应用程序时遇到问题。 首先,它将应用程序的所有文件重命名为某个随机名称。此外,当我尝试访问网站 .appspot.com 时,出现内部错误。
已创建 app.yaml 文件:
# [START runtime]
runtime: python27
entrypoint: gunicorn -b :$PORT mysite.wsgi
threadsafe: true
# [END runtime]
handlers:
- url: /static
static_dir: website/static
- url: /.*
script: main.application
libraries:
- name: django
version: 1.11
还创建了 appengine_cofig.py 文件:
# Copyright 2015 Google Inc. All rights reserved.
#
# 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 vendor]
from google.appengine.ext import vendor
vendor.add('lib')
# [END vendor]
提前感谢您的帮助....
【问题讨论】:
-
您帖子中的信息不足,无法真正为您提供很大帮助。突出的一件事是您将灵活环境中的语法与标准环境相结合(
entrypoint仅适用于灵活环境)。 -
从初学者的角度来看...如何让我的 django 网站在 google 应用引擎上启动并运行???
标签: python django google-app-engine deployment app.yaml