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.
How do you set environment variables on Cloud Foundry v2?
-
04-06-2022 - |
Вопрос
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
Решение 2
Другие советы
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
Не связан с StackOverflow