我想在谷歌应用引擎中部署下面的python结构,我想知道如何使用核心python包为下面的flask应用程序配置.yaml文件,并请建议一个更好的方法在谷歌应用引擎中部署代码。(我想将所有的包部署在一个位置/目录中)
包:
Model-Engine
- api
- api
- __int__.py
- view.py
- utils.py
- models.py
- tests
- runserver.py
- setup.py
- driver
- driver
- core
- __init__.py
- celery.py
- celery_tasks.py
- tests
- setup.py
Physics
- core
- core
- __init__.py
- base.py
- pipe_line_simulation.py
-tests
- setup.py
Gas-model
- src
- model
- __init__.py
- gas_model.py
- converter
- __init__.py
- hdf5_to_csv.py
- setup.py发布于 2016-09-26 16:54:54
我的建议。
1.在谷歌管理控制台google admin console中创建应用程序
中
示例代码:
application: "Application name from google app engine"
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /
script: home.app
- url: /index\.html
script: home.app
- url: /stylesheets
static_dir: stylesheets
- url: /(.*\.(gif|png|jpg))$
static_files: static/\1
upload: static/.*\.(gif|png|jpg)$
- url: /admin/.*
script: admin.app
login: admin lib),将所有依赖项放入文件夹appengine_config.py,并放入以下代码。from google.appengine.ext import vendor
vendor.add('lib')
appcfg.py update -A {your-project-id} -V v1。
如果这不是第一次部署,则需要将新版本设置为default版本
appcfg.py set_default_version -V v1 -A {your-project-id}祝贺你!您的应用程序现在已在您的-app-id.apppot.com上运行
https://stackoverflow.com/questions/39696378
复制相似问题