Eric Wong <[email protected]> wrote: > > B) Is there a reason `unicorn_rails` must start in the app root and > > doesn't allow it as a config option? > > Since the config file is just Ruby, you can just Dir.chdir inside it. > And since the chdir is done when the config file is evaluated, the > chdir can be done across restarts/reloads (you can point it to a > symlinked directory) to pick up new code/releases. > > If you do that, I would initially start Unicorn in "/" or some other > directory that won't get deleted so you'll be safe for upgrades. > > If you managed to forget that, you can set the following in your > Unicorn config: > > Unicorn::HttpServer::START_CTX[:cwd] = "/"
Maybe having a 'working_directory "/path/to/app/root"' that does: Dir.chdir(Unicorn::HttpServer::START_CTX[:cwd] = arg) Internally would make things easier? I see nginx has a "working_directory" config option as well: http://wiki.nginx.org/NginxHttpMainModule -- Eric Wong _______________________________________________ mongrel-unicorn mailing list [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn
