简体   繁体   中英

FASTAPI app not working with GCP APP engine

I am trying to deploy a fastAPI app with python 7 to the GCP app engine. After configuring the app.yaml file app is working fine with dev_server while using the command dev_server app.yaml . But after deploying the app using gcloud app deploy and followed by gcloud app browser I am getting an access URL.

After hitting the URL I am facing an error as below

在此处输入图片说明

Note - I am using a quick lab for learning the deployment. And things are working fine with flask app but not working with the FastApi app.

Since you already used the devapp_server command in order to test your application and it works, as a suggestion in order to check why you are facing this issue, you can try to see your App's logs in the Developer Console from GCP.

Also, can be checked with the Logs Viewer and the console using the command line:

gcloud app logs tail

Check this documentation for further information about writing and viewing logs from your app.

Moreover I could find a tutorial about Deploying FastAPI in AppEngine . Maybe it could help you to develop it through this way also.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM