Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XCZvc-0004S7-Q1 for pgsql-pkg-docker@arkaria.postgresql.org; Wed, 30 Jul 2014 19:52:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XCZvb-0006m3-Ha for pgsql-pkg-docker@arkaria.postgresql.org; Wed, 30 Jul 2014 19:52:47 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XCZva-0006le-Fp for pgsql-pkg-docker@postgresql.org; Wed, 30 Jul 2014 19:52:46 +0000 Received: from mx-out.zmailcloud.com ([192.198.85.98] helo=mx-out-1.zmailcloud.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XCZvT-0003O5-4D for pgsql-pkg-docker@postgresql.org; Wed, 30 Jul 2014 19:52:44 +0000 Received: from smtp.01.com (smtp.01.com [10.10.0.43]) by mx-out-1.zmailcloud.com (Postfix) with ESMTP id F2C525652A2; Wed, 30 Jul 2014 14:52:22 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id DBD15A0392; Wed, 30 Jul 2014 14:52:22 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sBleOZQHjqu7; Wed, 30 Jul 2014 14:52:22 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id BB091A0567; Wed, 30 Jul 2014 14:52:22 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id A57A9A0553; Wed, 30 Jul 2014 14:52:22 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Xm_pc4zooQYS; Wed, 30 Jul 2014 14:52:22 -0500 (CDT) Received: from [172.47.23.104] (50-0-190-100.dsl.dynamic.sonic.net [50.0.190.100]) by smtp-out-1.01.com (Postfix) with ESMTPSA id 1300EA055D; Wed, 30 Jul 2014 14:52:21 -0500 (CDT) Message-ID: <53D94CF4.8090000@agliodbs.com> Date: Wed, 30 Jul 2014 12:52:20 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Tianon Gravi CC: Joe Ferguson , Postgres-Docker Mailing List Subject: Re: SSH-free PostgreSQL References: <53D7E53A.5080505@agliodbs.com> <53D9319A.7080708@agliodbs.com> <53D94A0E.5070103@agliodbs.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-pkg-docker Precedence: bulk Sender: pgsql-pkg-docker-owner@postgresql.org On 07/30/2014 12:42 PM, Tianon Gravi wrote: > On 30 Jul 2014 13:40, "Josh Berkus" > wrote: >> >> On 07/30/2014 12:34 PM, Joseph Ferguson wrote: >> > On Wed, Jul 30, 2014 at 11:55 AM, Josh Berkus > wrote: >> >> >> >> Question: how does --link work if the two dockers are on different > machines? >> > >> > Currently it does not work at all. The local docker daemon knows >> > nothing of other docker daemons. I think expanding --link or >> > something similar is planned for the future. >> > >> > Regardless, the --link could still be emulated by setting the correct >> > env vars (POSTGRES_PORT_5432_TCP_ADDR POSTGRES_PORT_5432_TCP_PORT) on >> > the linked-from host and setting the proper routing and possible port >> > mapping to the container on the other machine. >> >> Those settings aren't *enough* though. We also need to know user and >> application name. > > Well, you're not going to get that from just --link either, so I don't > see a way for those to not be specified by the user. Yeah, so I think having a MASTER_CONNECT_STRING ENV specified by the user is the way to go. If it's populated, it's a replica. This brings up another issue with using the Ubuntu packages. Those packages initdb a database directory. Increasingly, I'm thinking that we *don't* want the generic initdb'd directory; we want to populate it with something more sensible (whether master or replica). Is there a more elegant way to do this than scripting an rm -rf? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-pkg-docker mailing list (pgsql-pkg-docker@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-pkg-docker