Replies: 2 comments
-
Since common_env_vars = {
RAILS_LOG_TO_STDOUT: '1',
RAILS_MASTER_KEY: :prompt,
# ... other common environment variables
}
environment :production do
set env_vars: common_env_vars.merge(RACK_ENV: 'production', RAILS_ENV: 'production' )
end
environment :staging do
set env_vars: common_env_vars.merge(RACK_ENV: 'staging', RAILS_ENV: 'staging')
end Do you think it is worth introducing a new DSL method for this? I am not sure I want to add to the DSL for something that can be accomplished with plain Ruby that people already know. Thoughts? |
Beta Was this translation helpful? Give feedback.
-
This is exactly how I am doing it currently to make this work About the new DSL. The question is how do developers who are writing a custom tomo plugin, add new environment variables or linked_dirs? cause currently I was thinking of grouping together related stuff and put it into a separate plugin instead of having a giant ./tomo/config.rb but couldn't try it since set env_vars overrides the hash completely. |
Beta Was this translation helpful? Give feedback.
-
Currently when using set env_vars, it completely overrides the value of env_vars variable which is not ideal in a multi environment setup where we share most of the environment variables and only a few differs. Shouldn't we use hash merge here by default or add a new command for appending new values or updating existing ones, this way we can have,
Beta Was this translation helpful? Give feedback.
All reactions