Our application is a Saas for the hospital, is deployed on one production server (same code with linux+nginx+puma) for all our clients. By default, there are three of them: test, development and production. But in our case, we have 10 environments config files point to 10 clients config file in folder 'config/environments/'. And we give hospitals name to environment file, such as
config/environments/hospital1.rb
config/environments/hospital2.rb
config/environments/hospital3.rb
...
There are several features paid is developed with engine.
Now imagine that hospital1 paid for feature1. How to active feature1 only for hospital1 ? I am currently doing this in Gemfile
group :hospital1 do
gem 'feature1', path to ....
end
Question: Is this a good way to replace production environment to client-specific environment and be able to Enable/Disable a gem in GEMFILE ?
Any suggestion is welcome!