I have a Java Application that serves as the Backend to our entire project and all of our software is fully open source. The problem is as follows:
We use several API keys from Google, SendGrid to MySQL Database authentication keys. All of these are stored in the
An environment allows you to organize and communicate between your
containers. When you click 'start' on a container from the enviroment,
the networking automatically configures, and notify any other
containers within the environment of its presence.
Cycle allows you to configure environment variables per environment, and they are treated the same way environment variables on your local machine would be treated. This means you can configure for example, the SENDGRID_API_KEY variable, set it in Cycle to your API key (Navigate to Environments -> Container -> Config) and have your code read that variable directly.
You can declare environment variables that exist in your dockerfile (
ENV SENDGRID_API_KEY=""), and Cycle will pre-populate those so that you can just fill in the box and hit save. You'll need to restart the container, but then your variables should be available to your program without you having to manage moving files around.