Our Go application, previously built as a docker repo, uses NATS and requires a credentials file to load. Their libraries do no support anything else (as far as I can tell.)
I can set the credential file’s contents in an encrypted environment variable, but I have been unable to copy it into place using the “Run Command” configuration option. Setting the command to the following for example just gives back
 during deployment in the logs, which I’m assuming is some kind of security mechanism:
sh -c 'echo $NATS_CREDS_FILE > /app/config/nats.creds' ./app serve
Is there any other way to achieve this? Thanks.
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.
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.
Click below to sign up and get $100 of credit to try our products over 60 days!