How to deploy Flutter Web App on GCP App Engine

Viewed 762

I have a static flutter web app. It's the portfolio website for one of my clients and they want to host in GCP only. I was unable to find proper documentation for the same.

What will be inside app.yaml after building the flutter app to HTML, CSS and JS files, or is there any better way?

Please Help!

1 Answers

You might have mixed the concept with a static web app using HTML and a static web app using Flutter, the latter needs additional settings in AppEngine. To host Flutter WebApp with AppEngine, you need AppEngine flex instead of standard, so you need to create your own container, in this case, it might be easier to use Cloud Run instead if you are looking for an all-in-one serverless solution.

To answer your original question, your app.yaml can be really simple for AppEngine flex, with just two lines:

runtime: custom
env: flex
Related