According to Docs:
entrypoint
Optional. Overrides the default startup behavior by executing the entrypoint command when your app starts. For your app to receive HTTP requests, the entrypoint element should contain a command which starts a web server that listens on port 8080.
How would I configure this? there are no details found anywhere. Can I do this?
entrypoint: go run main.go fooArg --bar-flag=1
I don't have cloud build file, only app.yaml. so what does entrypoint really do? when app engine reaches entrypoint part is the program already compiled?
Thank you
I tried this just now with my own GCP AppEngine project and using
entrypoint
(eg.entrypoint: go run ./cmd/web prod
) did not work for me. When I tried it, I am getting this cryptic error message:I'm using
Google Cloud SDK 344.0.0
.I'm in a similar situation like you though where I'm simply trying to pass in
args
into my golang main. Following the docs, I changed over to usingenv_variables
instead which worked.My app.yaml looks like:
and then in my code, I simply use
os.Getenv("APP_ENV")
anywhere to access.