I created an App using the AppCreate. I want to know if there is a way to upload a secret credential file like on render. I have a secret firebase credential that I have not uploaded to Github, but is required to run the app. I want to know of possible solutions.
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.
Hey there,
What I’ve done in the past with similar use cases when using a self-managed Kubernetes cluster as well as the App Platform, was to convert my credentials file to a base64 string, and then set that string as an environment variable. When your app starts up, it would need to decode the base64 string and write it to a file, which you could then use as usual.
For example, to encode and decode using bash:
The encoded content from
encoded.txt
can then be added as an environment variable through the DigitalOcean Control Panel. Make sure your application then decodes this atIf instead, you would like to see this as a feature in the App Platform. the best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.
An alternative option would also be to instead of using a credentials file, you could extract the necessary credentials from the file and set them as environment variables in your App’s settings on the DigitalOcean App Platform. Then, in your application, you’d modify it to read these credentials from environment variables instead of a file.
Hope that helps!
- Bobby.