italomaia / flask-empty

An empty project skeleton / boilerplate for flask projects. Powered by CookieCutter.
667 stars 93 forks source link

Any ideas on how to deploy on Google App Engine? #43

Open gianpaj opened 3 years ago

gianpaj commented 3 years ago

I'm getting this error:

Failed to find attribute 'app' in 'main'.

This is the app.yaml I was using:

runtime: python37

automatic_scaling:
  min_idle_instances: 1

inbound_services:
  - warmup

handlers:

  # This configures Google App Engine to serve the files in the app's static
  # directory.
- url: /static
  static_dir: static

  # This handler routes all requests not caught above to your main app. It is
  # required when static routes are defined, but can be omitted (along with
  # the entire handlers section) when there are no static files defined.
- url: /.*
  script: auto
  secure: always

I tried specifying the entrypoint on the yaml file

entrypoint: gunicorn -b :$PORT wsgi:app

but it didn't work

https://cloud.google.com/appengine/docs/standard/python3/runtime#application_startup

I'm testing locally with:

dev_appserver.py

https://cloud.google.com/appengine/docs/standard/python3/testing-and-deploying-your-app