Re: Docker container - servers.json

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Ashish Chandra <ashish(dot)cppdev(at)gmail(dot)com>, pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Docker container - servers.json
Date: 2021-11-03 14:59:30
Message-ID: CA+OCxowA7dUTL2X0m4u_gc7FyxMfNZvz_95LRE9PxZMUHch_KQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Wed, Nov 3, 2021 at 2:56 PM Ashish Chandra <ashish(dot)cppdev(at)gmail(dot)com>
wrote:

> Actually, the issue was me not reading the fine print that the
> servers.json is only used when the volume is created, and not subsequently.
> I did a docker prune of all the volumes and re-ran my setup and the
> servers.json was in fact used.
>

Ah, good.

>
> As to your comment about the Dockerfile, I am using it and it does default
> to putting the file in /pgadmin4.
>

Interesting - I guess that's because our Dockerfile has "WORKDIR /pgadmin4"
in it. I didn't realise that would affect a "downstream" Dockerfile as well.

>
> On Wed, Nov 3, 2021 at 4:29 AM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>> Hi
>>
>> On Tue, Nov 2, 2021 at 7:09 PM Ashish Chandra <ashish(dot)cppdev(at)gmail(dot)com>
>> wrote:
>>
>>> Hi,
>>>
>>> According to
>>> https://www.pgadmin.org/docs/pgadmin4/development/container_deployment.html
>>> having a files servers.json in the /pgadmin4 folder should enable server
>>> info to be pre-loaded into pgadmin4 when it launches.
>>>
>>> However, I am unable to see any impact from having this file. Here are
>>> the docker logs from the container:
>>>
>>
>> ...
>>
>>
>>> Here is my Dockerfile:
>>>
>>> FROM dpage/pgadmin4:latest
>>> EXPOSE 80
>>> COPY --chown=pgadmin:pgadmin servers.json .
>>>
>>>
>> Won't that copy servers.json into /, not /pgadmin4/?
>>
>> In any case, this seems like an odd way to do this - any reason not to
>> just map the file as Aditya suggested? I suppose if you're distributing the
>> container to others it might make sense.
>>
>> --
>> Dave Page
>> Blog: https://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EDB: https://www.enterprisedb.com
>>
>>

--
Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: https://www.enterprisedb.com

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Wood, Burt [US] (ES) 2021-11-04 04:42:51 RHEL8 RPMs for Pgadmin4
Previous Message Fahar Abbas 2021-11-03 10:04:48 Re: help me solve the error