mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Update docs to more accurately reflect the SERVER_MODE config requirements.
This commit is contained in:
parent
a65f7b330b
commit
5c016f0993
@ -16,12 +16,13 @@ packages and users interested in understanding how pgAdmin works.**
|
|||||||
Configuration
|
Configuration
|
||||||
*************
|
*************
|
||||||
|
|
||||||
In order to configure pgAdmin to run in desktop mode, it is first necessary to
|
From pgAdmin 4 v2 onwards, the default configuration mode is server, however,
|
||||||
configure the Python code to run in single-user mode, and then to configure the
|
this is overridden by the desktop runtime at startup. In most environments, no
|
||||||
runtime to find and execute the code.
|
Python configuration is required unless you wish to override other default
|
||||||
|
settings.
|
||||||
|
|
||||||
Note that there are multiple configuration files that are read at startup by
|
There are multiple configuration files that are read at startup by pgAdmin. These
|
||||||
pgAdmin. These are as follows:
|
are as follows:
|
||||||
|
|
||||||
* ``config.py``: This is the main configuration file, and should not be modified.
|
* ``config.py``: This is the main configuration file, and should not be modified.
|
||||||
It can be used as a reference for configuration settings, that may be overridden
|
It can be used as a reference for configuration settings, that may be overridden
|
||||||
@ -35,30 +36,10 @@ pgAdmin. These are as follows:
|
|||||||
for end users to change any default or packaging specific settings that they may
|
for end users to change any default or packaging specific settings that they may
|
||||||
wish to adjust to meet local preferences or standards.
|
wish to adjust to meet local preferences or standards.
|
||||||
|
|
||||||
Python
|
NOTE: If the SERVER_MODE setting is changed in ``config_distro.py`` or ``config_local.py``,
|
||||||
------
|
you will most likely need to re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH
|
||||||
|
and STORAGE_DIR values as well as they will have been set based on the default
|
||||||
In order to configure the Python code, follow these steps:
|
configuration or overridden by the runtime.
|
||||||
|
|
||||||
1. Ensure that any existing configuration database (``pgadmin4.db``) is moved
|
|
||||||
out of the way in the ``web/`` directory containing the pgAdmin Python code.
|
|
||||||
|
|
||||||
2. Create a ``config_local.py`` file alongside the existing ``config.py`` file.
|
|
||||||
|
|
||||||
3. Edit ``config_local.py`` and add the following setting:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
SERVER_MODE = False
|
|
||||||
|
|
||||||
4. Run the following command to create the configuration database:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ python setup.py
|
|
||||||
|
|
||||||
Alternatively, you can simply run ``pgAdmin4.py`` at this point or at a later time,
|
|
||||||
and ``pgadmin4.db`` will be created automatically at first run.
|
|
||||||
|
|
||||||
Runtime
|
Runtime
|
||||||
-------
|
-------
|
||||||
|
@ -46,7 +46,7 @@ little practical gain.
|
|||||||
Configuration
|
Configuration
|
||||||
*************
|
*************
|
||||||
|
|
||||||
In order to configure pgAdmin to run in server mode, it is first necessary to
|
In order to configure pgAdmin to run in server mode, it may be necessary to
|
||||||
configure the Python code to run in multi-user mode, and then to configure the
|
configure the Python code to run in multi-user mode, and then to configure the
|
||||||
web server to find and execute the code.
|
web server to find and execute the code.
|
||||||
|
|
||||||
@ -68,19 +68,17 @@ pgAdmin. These are as follows:
|
|||||||
Python
|
Python
|
||||||
------
|
------
|
||||||
|
|
||||||
|
From pgAdmin 4 v2 onwards, server mode is the default configuration. If running under
|
||||||
|
the desktop runtime, this is overridden automatically. There should typically be no
|
||||||
|
need to modify the configuration simply to enable server mode to work, however it may
|
||||||
|
be desirable to adjust some of the paths used.
|
||||||
|
|
||||||
In order to configure the Python code, follow these steps:
|
In order to configure the Python code, follow these steps:
|
||||||
|
|
||||||
1. Create a ``config_local.py`` file alongside the existing ``config.py`` file.
|
1. Create a ``config_local.py`` file alongside the existing ``config.py`` file.
|
||||||
|
|
||||||
2. Edit ``config_local.py`` and add the following setting:
|
2. Edit ``config_local.py`` and add the following settings. In most cases, the default
|
||||||
|
file locations should be appropriate:
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
SERVER_MODE = True
|
|
||||||
|
|
||||||
3. In most cases, the default file locations are setup for running in desktop mode.
|
|
||||||
Add settings similar to the following to ``config_local.py`` to use paths suitable
|
|
||||||
for server mode.
|
|
||||||
|
|
||||||
*NOTE: You must ensure the directories specified are writeable by
|
*NOTE: You must ensure the directories specified are writeable by
|
||||||
the user that the web server processes will be running as, e.g. apache or www-data.*
|
the user that the web server processes will be running as, e.g. apache or www-data.*
|
||||||
|
Loading…
Reference in New Issue
Block a user