ENV variables from app.yaml not available during npm postinstall

41 views
Skip to first unread message

Adnan Ibrišimbegović

unread,
May 6, 2018, 12:00:15 PM5/6/18
to Google App Engine
Using App Engine Flexible, nodeJS v8+.
I have a npm postinstall script that requires some env variables from app.yaml, but these vars are seemingly not available at the time "postinstall" script is running.

Can anyone point me to a documentation that explains what happens during deploy to App Engine, 
specifically, which services and variables become available in which order during deployment?

Can someone explain at what point do env vars from app.yaml become available under "process.env"?

Thank you.

Steren Giannini

unread,
May 7, 2018, 12:13:22 PM5/7/18
to google-a...@googlegroups.com
Hi,

The install and postinstall steps do not happen in the same environment as the serving environment, they are done in Google Container Builder.
Once the app is built, it is moved to the serving environment.
I would need to double check, but I do not think env variables defined in app.yaml are injected in the build steps.

Could you tell us more about your use case?

Thanks
Steren
Product Manager
Google Cloud Platform

--
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 google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/ad70ec56-293a-4956-a000-26e8bc4c8eeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages