Since you're using managed nodejs runtime, you can remove the `entrypoint` 
from your app.yaml
App Engine will automatically launch the application for you.
You're getting the 502 error because App Engine is trying to find an 
entrypoint since it is define in the .yaml but cannot launch it.


On Monday, February 17, 2020 at 1:23:41 PM UTC-5, Mohammed Hayat wrote:
>
> Hello, 
>
> I am trying to deploy a react app to GAE flex and I've made sure that the 
> app is listening to port 8080 but for some reason everything I do results 
> in a page that says `502 Bad Gateway nginx`, this is what my app.yaml looks 
> like: 
>
> # runtime to spin up frontend
> runtime: nodejs
>
> # type of App Engine environment
> env: flex
>
> # command to begin frontend server
> entrypoint: yarn start
>
> # name of the service (default because this is where we want traffic to go)
> service: default
>
> # computing resources (went with defaults)
>
>
> # scaling configuration
> automatic_scaling:
>   min_num_instances: 1
>   max_num_instances: 2
>   cool_down_period_sec: 140
>   cpu_utilization:
>     target_utilization: 0.6
>
> # handlers for routing
> handlers:
>   - url: /
>     static_files: build/index.html
>     upload: build/index.html
>
>   - url: /(.*)
>     static_files: build/\1
>     upload: build/(.*)
>
>  
> I have edited the start script to include 'PORT=8080', but that does not 
> help.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6593c327-7d0f-42fc-9952-d4a2fe127522%40googlegroups.com.

Reply via email to