unicorn/reexec/bundler/cap deploy issue
skaar
skaar at waste.org
Sun Jan 3 12:08:02 EST 2010
> Hi skaar,
>
> Does having this in the Unicorn config file work for you?
>
> stash_env = %w(PATH RUBYOPT).map { |x| [ x, ENV[x] ] }
> before_exec do |_|
> stash_env.each { |(k,v)| ENV[k] = v }
> end
>
> It's more generic and less surprising for people that (may) want
> to change environment variables on upgrades:
yep, that does the job just fine - thanks.
> Early versions of Unicorn actually captured the entire ENV at startup
> and restored it before exec. I felt it was too heavy-handed since I
> figured any process that changed its environment variables has good
> reason to do so, so I've been trying to leave as much alone as
> possible...
the approach of just stashing what you need from ENV as above is by far
a better approach than just forcing in the reexec code.
thanks again
--
/skaar
skaar at waste.org
where in the W.A.S.T.E is the wisdom
s_u_b_s_t_r_u_c_t_i_o_n
More information about the mongrel-unicorn
mailing list