I have an application that ran fine under the Python 2.7 Standard framework, and runs fine as two separate applications in the 3.7 framework, but I can't figure out how to configure them as a single application with two services.
main.app consists of the following two lines (paralleling what used to work in the 2.7 framework)
from app import app
from update import update
The app.yaml for main consists of nothing but runtime: python37
Each of the two python packages under main (app and update) have their own app.yaml as the new deployment document says they are supposed to. The problem is in the update package. I used to specify a handler which had script: main.update. That is no longer allowed (only auto is allowed.) Note that the app package works fine because app is the default entrypoint. I gather that the new way to specify where to go when the update service is run is to use entrypoint, but even after adding gunicorn to the requirements, the yaml statement
entrypoint: gunicorn b :$PORT main::update
which seems to be what's required, simply gives me a 500 http return. I also tried variants like main.update to no avail.
main.py
app.yaml
-->/app
-----> /app/__init__.py
-----> /app/app.yaml
-->/update
------> /update/__init__.py
------> /update/app.yaml
There are also template subdirectories to both packages and some other stuff, but they all work fine when run as separate versions
Here is my attempted yaml in the update directory:
runtime: python37
service: update
entrypoint: gunicorn -b :$PORT main.update
And here is the yaml in the app directory, which seems to work fine:
runtime: python37
service: default
handlers:
- url: /static
static_files: static/\1
upload: static/(.*\.(bmp|gif|ico|jpeg|jpg|png))
automatic_scaling:
max_idle_instances: 2
max_concurrent_requests: 12