Search code examples
herokuibm-cloudamazon-elastic-beanstalkcloud-foundry

How do I add local .env files to PaaS for faster deployment?


There is something I have never figured how to do with any PaaS provider.

How can I automatically deploy locally stored environment variables to PaaS when deploying the application? I know I can go to Heroku, AWS or Bluemix console and manually add my .envfile content as keys, but what I would really want to do is >

Pseudo code !

provider CLI deploy --ENV=.env.dev

Where --ENV is flag to use env. file stored in project root.

This would take my API keys from .env file and populate the provider environment variables. Preferably, the file would be usable across providers. Is this possible?


Solution

  • If you're using IBM BlueMix (or another Cloud Foundry), you can just list them in the application's manifest.yml file and cf push it with the rest of the application.