git - Appengine (Python) "Push to Deploy" app.yaml Location -
i have app following file structure
app ├── src │ ├── app.yaml │ ├── {other} │ ├── {.py source} │ └── {files} ├── {{other}} ├── {{meta}} └── {{data}}
before "push deploy", deploy app
cd app/; appcfg.py --oauth2 update src
i set "push deploy" seems requires app.cfg @ root directory this.
app ├── app.yaml ├── {other} ├── {.py source} ├── {files} ├── {{other}} ├── {{meta}} └── {{data}}
is there way use "push deploy" without moving {other .py source files} root directory?
i'm ok moving app.yaml file root. however, change in app.cfg required?
this app.cfg
file
application: myapp version: v1 runtime: python27 api_version: 1 threadsafe: true handlers: - url: / script: main.application - url: /tasks/.* script: tasks.update.app login: admin - url: /favicon.ico static_files: resources/images/static/favicon.ico upload: resources/images/static/favicon.ico - url: /redirect/.* script: redirect.app
you should able put of python source files in package (a subdirectory __init__.py
file in it), refer handlers package path.
app -- app.yaml -- myapp -- __init__.py -- main.py ...
the app.yaml
uses path so:
... handlers: - url: / script: myapp.main.application
Comments
Post a Comment