Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgVqH-0006CN-88 for pgadmin-hackers@arkaria.postgresql.org; Thu, 27 Jun 2019 14:57:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hgVqG-0007fL-05 for pgadmin-hackers@arkaria.postgresql.org; Thu, 27 Jun 2019 14:57:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgVqF-0007dv-KM for pgadmin-hackers@lists.postgresql.org; Thu, 27 Jun 2019 14:57:39 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgVqC-0006RY-SJ for pgadmin-hackers@lists.postgresql.org; Thu, 27 Jun 2019 14:57:38 +0000 Received: by mail-wm1-x344.google.com with SMTP id h19so7281608wme.0 for ; Thu, 27 Jun 2019 07:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wzjQQxdyJUCIjQ8PDdQtOfigktBVvfSJL3deBI0Hhio=; b=BhQDJnjGQqIer8IkTNWp3C9MPckBUJROaHhs+hV54wvPIRqAiAcAq3e3ba4yzX01Rf Om+W3RwSxlIcLCzPwRkUtsroii1vsIjmOD4IDr8BrTXsVenfIQY8KVHVwDuze/aMb11h 0Baiuh7bzxleVdpf1QyBcrqZUmSAJgkv+PUhfq2mgPK7fFlF6HcM39mBXEFfl/lGRMW3 VKhgVYNw+1PI0tKMDsHrx3Q7eaCJMeMQV/eMYP9tGcb4sSbwpCW6QqKn/Pn1CKxEmGo3 hZDRMznqn/ODDOTkR9/0+OUj9YHDw4C2HyKLLmPtlzfXG2U8p/dwaQWR6kDTyzKMPPKe V2qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wzjQQxdyJUCIjQ8PDdQtOfigktBVvfSJL3deBI0Hhio=; b=VJHK+MqFJT7jIZkkYDJC83UTz2WEubSaXv/KUOum7ol0v0wUFMcdWhzjEVjTe3HjkP nangYpsNimA/JSLbRV7g4oWCDeJZDA5OQaxKgkHjTivnGivyBXBaO8T2BYujPO0NQRZr ymjp6NNZL4Z8TyRYL6Z6Co8do0tGb2ZcZ6o8R+DgsibRTdxGE3PZ3kUTUCbUfAoqaeeb 6MWej5C+rBXdJKc8N/+QZc5uY8wrNDRQkI2d04JV+Tb9Eohp3Wa8oRVUIYIjTEtSl/PY 62YxvX2rfORojQeuyTkL3rcNuXPxI5PcJEHe3LLuMwgZm+ozCH3OIVc3jPjFt5NputYr TH6Q== X-Gm-Message-State: APjAAAXFbel/HeAg2hWraU1aeSrvGHSfRsP9On0yjarFBZsPn1xFxDus sKDQI2QAqDI8kWkAaJeK4s+eyLFZUO8Ed9Hzglc47w== X-Google-Smtp-Source: APXvYqwrlK23iyMaAtRNiRcUVCp3PcDHAgOOaKNceVD0/PeJ3Twp3PclPnDS4y7CsdBfEfKGhU7KdrSHmeaelVvzKq8= X-Received: by 2002:a1c:f018:: with SMTP id a24mr3427968wmb.66.1561647455348; Thu, 27 Jun 2019 07:57:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Thu, 27 Jun 2019 10:57:23 -0400 Message-ID: Subject: Re: change to Docker entrypoint.sh To: Andrew Coleman Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000d73e36058c4f6115" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000d73e36058c4f6115 Content-Type: text/plain; charset="UTF-8" On Thu, Jun 27, 2019 at 8:12 AM Andrew Coleman wrote: > > > On Fri, Jun 21, 2019 at 4:24 AM Dave Page wrote: > >> Hi >> >> On Thu, Jun 20, 2019 at 5:31 PM Andrew Coleman >> wrote: >> >>> Hi All! >>> >>> I am new to this, so I apologize beforehand if it's not entirely kosher, >>> but I have a proposed change to the Dockerfile entrypoint.sh to allow for >>> configurable servers.json filename path. >>> >>> The reasoning behind this is that I have a Kubernetes deployment of >>> pgadmin where I build a ConfigMap sort of dynamically. I can make the file >>> appear in /pgadmin4, but it removes the contents of the directory for me >>> (helpful!). Instead, I put it into a separate directory and set a new >>> environment variable that defaults to the old pathname >>> (backwards-compatible!) but allows me to set a custom environment variable >>> in my custom Helm chart for my deployment. >>> >> >> pgAdmin removes the content of the directory? I'm not sure how it would >> do that - it doesn't delete anything like that. >> > > pgAdmin does not do that. It behaves as you would expect. Kubernetes > removes the contents for me. It basically allows one of two options: > > file available at /pgadmin4/servers.json/servers.json and pgadmin works, > but never loads the file > file available at /pgadmin4/servers.json and nothing works because the > only file in /pgadmin4 is servers.json > OK, thanks. Patch applied! > > >> >>> >>> The code is here: >>> >>> https://github.com/penguincoder/pgadmin4/commit/0865400385ac0d03bf69d183e8cd9aaec6dcf318 >>> >>> Is this something that anyone is interested in? >>> >> >> Sure. >> >> >>> Does it meet your coding standards? >>> >> >> Looks fine to me. >> >> >>> What do I do next? >>> >>> I would love to move back to the "official" pgadmin container. >>> >> >> Please raise a feature request at >> https://redmine.postgresql.org/projects/pgadmin4/issues/new and attach >> the patch (just use git diff against a checkout of the master branch). You >> can send the patch here, but we need the feature request in the tracker >> anyway, so it's probably easier to attach it there. >> >> Thanks! >> >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --000000000000d73e36058c4f6115 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Jun 27, 2019 at 8:12 AM Andre= w Coleman <penguincoder@gmail.= com> wrote:


On Fri, Jun 21, 2019 at 4:24 AM Da= ve Page <dpage@pg= admin.org> wrote:
Hi

On Thu, Jun 20, 2019 at 5:31= PM Andrew Coleman <penguincoder@gmail.com> wrote:
Hi All!

<= /div>
I am new to this, so I apologize beforehand if it's not entir= ely kosher, but I have a proposed change to the Dockerfile entrypoint.sh to= allow for configurable servers.json filename path.

The reasoning behind this is that I have a Kubernetes deployment of pgadm= in where I build a ConfigMap sort of dynamically. I can make the file appea= r in /pgadmin4, but it removes the contents of the directory for me (helpfu= l!). Instead, I put it into a separate directory and set a new environment = variable that defaults to the old pathname (backwards-compatible!) but allo= ws me to set a custom environment variable in my custom Helm chart for my d= eployment.

pgAdmin removes the = content of the directory? I'm not sure how it would do that - it doesn&= #39;t delete anything like that.

pgAdmin does not do that. It behaves as you would expect. Kubernete= s removes the contents for me. It basically allows one of two options:

file available at /pgadmin4/servers.json/servers.json = and pgadmin works, but never loads the file
file available at /pg= admin4/servers.json and nothing works because the only file in /pgadmin4 is= servers.json

OK, thanks.= Patch applied!
=C2=A0

=C2=A0
Is this something that anyone is interested in?

Sure.
=C2=A0
Does it meet your co= ding standards?

Looks fine = to me.
=C2=A0
What do I do next?

I would love to move back to the "official" pgadmin contain= er.

Please raise a feature requ= est at=C2=A0https://redmine.postgresql.org/projects/pgadmin4= /issues/new=C2=A0and attach the patch (just use git diff against a chec= kout of the master branch). You can send the patch here, but=C2=A0=C2=A0we = need the feature request in the tracker anyway, so it's probably easier= to attach it there.

Thanks!


--
Dave Page
Blog: http://pgsnake.blogs= pot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
= The Enterprise PostgreSQL Company


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @p= gsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL = Company
--000000000000d73e36058c4f6115--