Re: Consider default SERVER_MODE =True for pgadmin4-v1-web

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Mike Surcouf <mikes(at)surcouf(dot)co(dot)uk>
Cc: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Consider default SERVER_MODE =True for pgadmin4-v1-web
Date: 2017-07-19 16:03:07
Message-ID: CA+OCxoyxy_qDe3WG_UR9L3HqQw-o3yfEHDfzYOTKUDcsrpciVA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Wed, Jul 19, 2017 at 4:54 PM, Mike Surcouf <mikes(at)surcouf(dot)co(dot)uk> wrote:

> It would be nice if the pgadmin40v1-web package set the SERVER_MODE = True
>
> I can't think why you would install the web package without this but there
> may be a reason?
>

Yes, it would break the default installation mode (desktop).

The web package is "the web components of pgadmin", not "pgadmin to run in
web mode".

> Also since the setup script does different things depending on this value
> if you don't do it first you have to delete the config and sqllite database
> and start again otherwise it will never work
>
> Currently I have this in my setup script
>
> #Overide SERVER_MODE (must be done BEFORE setup)
> cat >> /usr/lib/python2.7/site-packages/pgadmin4-web/config_local.py <<
> "EOF"
> SERVER_MODE = True
> EOF
>

I tend to just edit that setting in config_local.py as I need it, but then
also include:

# Use a different config DB for each server mode.
if SERVER_MODE == False:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-desktop.db'
)
else:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-server.db'
)

Anyway, to the main point - I've been trying to figure out a half-decent
way of being able to support both server and desktop modes out of the box;
and have yet to come up with anything that wouldn't be a tangled mess of
config files. I still have some ideas though, and hope to explore them some
more tomorrow.

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

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

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Mike Surcouf 2017-07-19 16:07:02 RE: Consider default SERVER_MODE =True for pgadmin4-v1-web
Previous Message Mike Surcouf 2017-07-19 15:54:58 Consider default SERVER_MODE =True for pgadmin4-v1-web