When I run zeus:
MY_VAR=MY_VALUE zeus start
Environment stays with that that variable, let's say I want to run Rails server with MY_VAR=MAY_VALUE_2
I have tried:
MY_VAR=MAY_VALUE_2 zeus s
But it does not work. I am using oh-my-zsh, in case that's important.
How can I do that?
Don't know if you still need help with but if you want to be able to store environmental variables in a file you can use the custom_plan.rb
that is generated with zeus init
. Below is a copy of my file. I am using Omniauth and need my keys to be easily changeable. You can add server only variables by overloading the server
method instead, just know that your initializers will be ran before the server command.
require 'zeus/rails'
class CustomPlan < Zeus::Rails
def boot
# Omniauth Keys
# GOOGLE+
ENV['GPLUS_KEY'] = 'xxx'
ENV['GPLUS_SECRET'] = 'xxx'
# FACEBOOK
ENV['FACEBOOK_KEY'] = 'xxx'
ENV['FACEBOOK_SECRET'] = 'xxx'
super # Finish boot
end
end
Zeus.plan = CustomPlan.new
Passing it in zeus start
SOME_ENV_VAR=test zeus start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With