Re: Possible to add servers to pgadmin4 via CLI or config files?

From: Glen Huang <heyhgl(at)gmail(dot)com>
To: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Cc: pgadmin-support(at)lists(dot)postgresql(dot)org
Subject: Re: Possible to add servers to pgadmin4 via CLI or config files?
Date: 2017-09-07 05:55:16
Message-ID: 7F2C27D6-77DF-451D-9F50-BB2056FB14AF@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Got it. Thanks!

> On 7 Sep 2017, at 1:53 PM, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com> wrote:
>
>
> On Thu, Sep 7, 2017 at 11:18 AM, Glen Huang <heyhgl(at)gmail(dot)com <mailto:heyhgl(at)gmail(dot)com>> wrote:
> Thanks for the detailed explanation.
>
> Yes, I currently run it the runtime mode.
>
> Good to know pgadmin4.db will be auto-migrated.
>
> But to prevent it from re-migrating every time the container starts afresh, I guess it’s better to re-add pgadmin4.db every once a while after I have upgraded to a new version?
> To be honest - it's a design choice, whether to go ahead with the existing configuration, or add them every once a while.
> Either way - it should work (except in rare condition, when we had to break the backward compatibility of the configuration due to some major change, which we always announce/shout about on pgadmin-hackers mailing list).
>
> -- Thanks, Ashesh
>
> Regards,
> Glen
>
>
>> On 7 Sep 2017, at 1:39 PM, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com <mailto:ashesh(dot)vashi(at)enterprisedb(dot)com>> wrote:
>>
>> On Thu, Sep 7, 2017 at 10:43 AM, Glen Huang <heyhgl(at)gmail(dot)com <mailto:heyhgl(at)gmail(dot)com>> wrote:
>> Hi,
>>
>> I’m running pgadmin in docker, and I’d like it to contain some servers by default when the container starts. Is there any way to add servers (ideally also preferences) via command line or some config files?
>>
>> Currently I keep a copy of pgadmin4.db after I have configured pgadmin, and put that in the docker. But I worry that the data structure of that db file can change, and I need to reconfigure pgadmin when I upgrade to a new version.
>>
>> Is copying over pgadmin4.db the right way to achieve that?
>> pgAdmin 4 can be run in two modes, server mode, and runtime (stand alone) mode.
>>
>> In server mode, generally - it should be accessible through browser, and hence - for security reasons, we create the user on first startup.
>> In runtime (stand alone mode), it runs as an application.
>>
>> I believe - you're talking about runtime mode.
>> Then - it's ok to share the pgadmin4.db (configuration file), but - it would be available to a particular user, as it is shared among the operating system users.
>>
>> pgAdmin 4 will do automatically upgrade of the configuration on next run, if some configuration has changed. So - it would safe to share the configuration file in dockers.
>>
>> -- Thanks, Ashesh
>>
>>
>> Regards,
>> Glen
>>
>
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Lazaro Garcia 2017-09-07 14:41:04 Is there any candidate release date for 1.7 version?
Previous Message Ashesh Vashi 2017-09-07 05:53:36 Re: Possible to add servers to pgadmin4 via CLI or config files?