Multi-line config variables in Heroku

前端 未结 6 1082
别那么骄傲
别那么骄傲 2020-12-08 00:29

I\'ve have a Rails app that loads a number of RSA certificates before a transaction is made with Paypal. On my development machine, these certificates are read from files in

6条回答
  •  一个人的身影
    2020-12-08 00:57

    We needed to do the same thing.

    You can wrap the variable value in double quotes:

    bobvila@bobuntu:~/svnroot/app/myapp$ heroku config:add woodchuck="How much wood
    > could a woodchuck chuck
    > if a woodchuck could chuck wood"
    Adding config vars and restarting myapp... done, v25
    woodchuck: How much wood
    could a woodchuck chuck
    if a woodchuck could chuck wood
    bobvila@bobuntu:~/svnroot/app/myapp$ heroku config
    === Config Vars for myapp
    woodchuck:                       How much wood
    could a woodchuck chuck
    if a woodchuck could chuck wood
    bobvila@bobuntu:~/svnroot/app/myapp$ 
    

    If you're using Foreman for localhost development, the .env file doesn't support multi-line variables so you'll need to export it to the shell before launching Foreman

提交回复
热议问题