Question

ENV vars don't get loaded on build-time in Worker components?

I have configured ENV vars via the App Platform UI for my new Worker component. The ENV vars were not loaded in on the Build stage of the Worker component.

It looks like these ENV vars do not get the default BUILD_AND_RUN_TIME scope. The “scope” key is non-existent if I inspect my Appspec via doctl. I had to manually add the “scope” key in my Worker component to make the Worker build work.

This is a bit confusing because the UI where you can manage ENV vars for Worker components also describes that the ENV vars will be added to the Build and Runtime stage.

This might be a bug or intentional. But if intentional, the ENV var management UI for Workers is a bit off.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hey Michiel! Thanks for flagging this. It’s definitely a bug—we’ll get it fixed as soon as possible!