figaro icon indicating copy to clipboard operation
figaro copied to clipboard

How do you export application.yml to env vars

Open TheNotary opened this issue 9 years ago • 1 comments

I'm noticing a command, figaro heroku:set which looks awesome, but I can't use it with dokku apparently. If there's nothing set up to do it with dokku, I'd appreciate a command that's something like figaro vars:dump that outputs something like this:

export AWS_PASS='blahblah'

So I can easily redirect that into my clipboard and then paste it into /home/dokku/app_name/ENV to get a new server setup and inline with my local dev/staging env.

TheNotary avatar Nov 10 '15 23:11 TheNotary

The https://github.com/laserlemon/figaro/blob/master/lib/figaro/cli/heroku_set.rb#L12-L14 is responsible for the heroku:set command. If you hack the first private method named run to be the below, you get a pretty nice command:

      def command
        # "heroku config:set #{vars} #{for_app} #{for_remote}"
        "echo dokku config:set APP_NAME #{vars} #{for_app} #{for_remote}"
      end

There's still a problem, that you need to manually replace APP_NAME in the output string.

Does anyone else want a figaro config:print or something?

TheNotary avatar Apr 25 '16 04:04 TheNotary