Report this

What is the reason for this report?

app platform common build phase

Posted on October 8, 2020

In my app, I use a single code base that can run in multiple ways (triggered by env vars). You can imagine having a single repo that knows how to either run in API mode or worker mode, or even wanting to scale different classes of queue workers independently.

Is there any kind of tooling set up to be able to use a common build between different app services like this?



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!

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.

The App Platform will reuse builds between components when possible. Sharing builds between components is contingent on the builds having the same git source, build-commands, build-time environment variables and other configuration which differentiate one-build from another.

In practice, the most common difference between builds is environment variables. By default variables are configured for both build and runtime. Using the API or doctl you can edit variables scope directly in the App spec to have only apply at runtime. Variables with RUN_TIME scope can differ between components without impacting build reuse.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.