I need to set up consumer key and secrets for Github, Twitter and Facebook.
On version 1 of Cloud Foundry you could do vmc env-add NAME=VALUE Now with the cf gem I see I can do cf env but thats it. I also tried setting a .env file and repushing with no success
Using the Cloud Foundry Command Line Interface (cf CLI), you can run the cf env command to view the Cloud Foundry environment variables for your app. The cf env command displays the following environment variables: The VCAP_APPLICATION and VCAP_SERVICES variables provided in the container environment.
On the Windows taskbar, right-click the Windows icon and select System. In the Settings window, under Related Settings, click Advanced system settings. On the Advanced tab, click Environment Variables. Click New to create a new environment variable.
You can modify environment variables associated with an application while the application is running using the cf set-env (to set or update) and cf unset-env (to delete). This will update the environment variable in Cloud Controller at the time you run the command.
In addition, you can set environment variables in an application manifest file.
Here is an example of how to do so (see the env
section of the manifest with name/value pairs)
---
applications:
- name: app1
env:
ENV_VAR_1: MYVALUE
ENV_VAR_2: ZZZ
It looks like you can do a cf set-env
(https://github.com/cloudfoundry/cf/blob/master/lib/cf/cli/app/env.rb). You can also always do a cf help --all
, which will show you all the commands you can use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With