By theozero
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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.