I have a file in space that I would like to add during building of my app deployed in App Platform.
My app is connected to github, but I don’t want to use github in this case. How it is done in app spec for example?
Thank you.
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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hello Ferd,
To include a file from DigitalOcean Spaces in the build process of your app on the DigitalOcean App Platform, you’ll need to configure your app to fetch the file from Spaces during the build phase. Here’s a general approach to achieve this:
Make sure that your file is accessible:
Modify Your Build Command:
Update your build process to include a
curl
command to download the file from Spaces.For example:
Replace
[local-path-to-save-file]
with the path and filename where you want to save the file in your build environment. Replace[file-url-in-spaces]
with the actual URL of your file in Spaces.Include the Command in Your App Spec or Build Script:
curl
command in thebuild_command
orrun_command
section.curl
command in the appropriate place.Make sure to replace the placeholders with your specific file’s details.
Hope that this helps and let me know how it goes!
Best,
Bobby