Simple, Heroku-friendly Rails app configuration using ENV
and a single YAML file
Figaro for Apollo
Apollo is a applicaiton configuration center. When we hanve many sub-portal and
want to unified management all config/application.yml
. This Gem result from the
idea.
Add Figaro to your Gemfile and bundle install
:
gem 'figaro', git: "https://github.com/feed-mob/feedmob-figaro", branch: 'master'
It load apollo.yml
to config apollo configuration center.
example:
APOLLO_CLUSTER: default
APOLLO_APP_ID: feedmob-XXX
APOLLO_HOST: http://localhost:8080
APOLLO_CUSTOM_CONFIG_FILE: ''
stage:
APOLLO_HOST: http://xxx.com:8080
production:
APOLLO_HOST: http://xxx.com:8080
If Apollo has configured, after this will overwrite local config/application.yml
and config/sidekiq.yml
- This Gem start when rails before configuration,
- If you single start sidekiq, Please start rails server first.
- Add prefix
SKIP_APOLLO=true
to the command If you want to run a command on stage/production environment without downloading apollo configurations
Just see the doc from the official.