From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ezra Zygmuntowicz Newsgroups: gmane.comp.lang.ruby.mongrel.devel Subject: Re: [ANN] Unicorn: UNIX+localhost/LAN-only Mongrel fork Date: Wed, 25 Feb 2009 23:06:49 -0800 Message-ID: <8A7FE402-3E32-4143-A561-CAF34853EEB3@gmail.com> References: <20090211230457.GB22926@dcvr.yhbt.net> <20090216233904.GB3198@dcvr.yhbt.net> <2A92C72C-498A-4A6E-9035-059CCF4C7371@gmail.com> <20090218004036.GA29439@dcvr.yhbt.net> <20090221151017.GA3788@untitled> <20090224010344.GG26706@dcvr.yhbt.net> <409638DC-A76B-40E1-AE5C-326F2573DACC@gmail.com> <20090224031223.GH26706@dcvr.yhbt.net> <20090226055544.GA20153@dcvr.yhbt.net> Reply-To: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235632233 15560 80.91.229.12 (26 Feb 2009 07:10:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Feb 2009 07:10:33 +0000 (UTC) To: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Original-X-From: mongrel-development-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Thu Feb 26 08:11:49 2009 Return-path: Envelope-to: gclrmd-mongrel-development@m.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=RaNyB1D/7xbGaand08gqHsgaW2+k2Jk3WH0LJdcJkBw=; b=D1AnAVO72D9QerideU4zWRuDZiyi8pzZ4I8RpJLyepifh99ck5J378HkKE0PFsTgUI CcpjcIrvuHksFUP82FjL6UdvAWjXrA43BLH0+wcxcMg8nIuNVdwTMxc/i5nUZ0Akxh3R J0OyipCiRhVuqQsoGptj7FbmM/tydqOLmdfkY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=vvmprehtEaHKC5MbkDyZRwNg+Jku2qhURlwXqeo0hHp0MvoR3eX9E4ArWHUsrE0MXK Ynsr7n1FIMwd+VB3vpYrKtK+8DbUXZBa9pAmHlnhUuH5HOK2jDbqE1QfJgKWTJRHJdga AIxF8RhFBJoTezXZ0VhkkqUCKS0/ZgeW5G9io= In-Reply-To: <20090226055544.GA20153-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Mailer: Apple Mail (2.930.3) X-BeenThere: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-development-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: mongrel-development-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.mongrel.devel:99 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1LcaPM-00022Z-2s for gclrmd-mongrel-development@m.gmane.org; Thu, 26 Feb 2009 08:11:48 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 0E27118580E9; Thu, 26 Feb 2009 02:10:25 -0500 (EST) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by rubyforge.org (Postfix) with ESMTP id 063CD18580E2 for ; Thu, 26 Feb 2009 02:06:56 -0500 (EST) Received: by wf-out-1314.google.com with SMTP id 28so467247wff.29 for ; Wed, 25 Feb 2009 23:06:56 -0800 (PST) Received: by 10.142.245.5 with SMTP id s5mr509533wfh.198.1235632016428; Wed, 25 Feb 2009 23:06:56 -0800 (PST) Received: from ?192.168.1.67? (99-8-186-145.lightspeed.snfcca.sbcglobal.net [99.8.186.145]) by mx.google.com with ESMTPS id 30sm1048821wfc.4.2009.02.25.23.06.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Feb 2009 23:06:52 -0800 (PST) List-Post: > OK, here's some thoughts leading up to what I'm probably going > to do... > > 1. APP_ROOT/config.ru is in a pretty standardized location, good. > > 2. Most config.ru files out there (probably) don't contain > environment-specific logic. That is, developers on their > desktop/laptops and the production app in datacenters can > share the same config.ru without much difficulty. > > Can somebody please confirm this assumption? Yeah i think APP_ROOT/config.ru is the standard here. Passenger uses it and its easy to use form rackup. heroku and ey-solo both look for config.ru in the approot. > > 3. Unicorn-specific config options should only be needed for > server deployments. Things for the typical developer > on their workstation should "just work", like running > "script/server" and "mongrel_rails" in RAILS_ROOT does > for old Rails apps. Yeah I think this is a better idea then my suggestion. > > > This leads me to keeping the Unicorn config file separate for > production > environments. My personal experience (with old Rails apps) is that > there are multiple "production"-like environments (staging, QA, > different datacenters)... > > I'd imagine some apps I support will end up with config file > layouts looking like this: > > APP_ROOT/config/unicorn/prod_lax.rb > APP_ROOT/config/unicorn/prod_dfw.rb > APP_ROOT/config/unicorn/prod_nyc.rb > APP_ROOT/config/unicorn/prod_chi.rb > APP_ROOT/config/unicorn/qa.rb > APP_ROOT/config/unicorn/staging.rb > APP_ROOT/config/unicorn/demo.rb > APP_ROOT/config.ru > > Thus to deploy to our Los Angeles datacenter, the script > would just run: > > unicorn -c APP_ROOT/config/unicorn/prod_lax.rb > > If there's an APP_ROOT/config_prod.ru needed, then > the APP_ROOT/config/prod_*.rb files would each > be able to specify APP_ROOT/config_prod.ru instead > of APP_ROOT/config.ru. > > That is, the Unicorn config file can specify an alternate > config.ru, but config.ru cannot specify a different > Unicorn config file. > > Am I making sense? (it's been a long week for me so far...) I think you've nailed it here. Cheers- Ezra