On Wed, Jul 19, 2017 at 4:54 PM, Mike Surcouf <mi...@surcouf.co.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