Question

app platform common build phase

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?


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.

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.