codekingpro/portable-devtools
114k
1���� �sphinx.addnodes��document���)��}�(� rawsource�� ��children�]�(�docutils.nodes��target���)��}�(h�.. _container_deployment:�h]��2attributes�}�(�ids�]��classes�]��names�]��dupnames�]��backrefs�]��refid��container-deployment�u�tagname�h3�line�K�parent�h� _document�h�source��oD:\a\pgadmin-packaging-foundation\pgadmin-packaging-foundation\pgadmin4-8.6\docs\en_US\container_deployment.rst�ubh �section���)��}�(hhh]�(h �title���)��}�(h�`Container Deployment`:index:�h]�(h �index���)��}�(hhh]�h}�(h]�h]�h]�h]�h]��entries�]�(�single��Container Deployment��index-0�hNt�auhh/h"h#hKh h+ubh)��}�(hhh]�h}�(h]�h>ah]�h]�h]�h]�uhh4h h+ubh �Text����Container Deployment�����}�(h h+h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhh)h h&h!hh"h#hKubh � paragraph���)��}�(h�:pgAdmin can be deployed in a container using the image at:�h]�hJ�:pgAdmin can be deployed in a container using the image at:�����}�(h hWh!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh h&h!hubh �block_quote���)��}�(h�)https://hub.docker.com/r/dpage/pgadmin4/5�h]�hV)��}�(h�(https://hub.docker.com/r/dpage/pgadmin4/�h]�h � reference���)��}�(hhmh]�hJ�(https://hub.docker.com/r/dpage/pgadmin4/�����}�(h hqh!hh"NhNubah}�(h]�h]�h]�h]�h]��refuri�hmuhhoh hkubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK h hgubah}�(h]�h]�h]�h]�h]�uhheh"h#hK h h&h!hubhV)��}�(h��There are various tags that you can select from to get the version of pgAdmin6that you want, using a command such as this if you're using Docker:�h]�hJ��There are various tags that you can select from to get the version of pgAdmin7that you want, using a command such as this if you’re using Docker:�����}�(h h�h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh h&h!hubh �
literal_block���)��}�(h�%docker pull dpage/pgadmin4:<tag name>�h]�hJ�%docker pull dpage/pgadmin4:<tag name>�����}�h h�sbah}�(h]�h]�h]�h]�h]�� xml:space��preserve��force���language��bash��highlight_args�}�uhh�h"h#hKh h&h!hubhV)��}�(h�+where *<tag name>* is one of the following:�h]�(hJ�where �����}�(h h�h!hh"NhNubh �emphasis���)��}�(h�*<tag name>*�h]�hJ�8<tag name>�����}�(h h�h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h h�ubhJ� is one of the following:�����}�(h h�h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hKh h&h!hubh �table���)��}�(hhh]�h �tgroup���)��}�(hhh]�(h �colspec���)��}�(hhh]�h}�(h]�h]�h]�h]�h]��colwidth�Kuhh�h h�ubh�)��}�(hhh]�h}�(h]�h]�h]�h]�h]��colwidth�Kuhh�h h�ubh �thead���)��}�(hhh]�h �row���)��}�(hhh]�(h �entry���)��}�(hhh]�hV)��}�(h�Tag name�h]�hJ�Tag name�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh h�ubah}�(h]�h]�h]�h]�h]�uhh�h h�ubh�)��}�(hhh]�hV)��}�(h�Description�h]�hJ�Description�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh j ubah}�(h]�h]�h]�h]�h]�uhh�h h�ubeh}�(h]�h]�h]�h]�h]�uhh�h h�ubah}�(h]�h]�h]�h]�h]�uhh�h h�ubh �tbody���)��}�(hhh]�(h�)��}�(hhh]�(h�)��}�(hhh]�hV)��}�(h�latest�h]�hJ�latest�����}�(h jC h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh j@ ubah}�(h]�h]�h]�h]�h]�uhh�h j= ubh�)��}�(hhh]�hV)��}�(h�The most recent release.�h]�hJ�The most recent release.�����}�(h jZ h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh jW ubah}�(h]�h]�h]�h]�h]�uhh�h j= ubeh}�(h]�h]�h]�h]�h]�uhh�h j: ubh�)��}�(hhh]�(h�)��}�(hhh]�hV)��}�(h�8.4�h]�hJ�8.4�����}�(h jz h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh jw ubah}�(h]�h]�h]�h]�h]�uhh�h jt ubh�)��}�(hhh]�hV)��}�(h�&A specific version (8.4 in this case).�h]�hJ�&A specific version (8.4 in this case).�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh j� ubah}�(h]�h]�h]�h]�h]�uhh�h jt ubeh}�(h]�h]�h]�h]�h]�uhh�h j: ubh�)��}�(hhh]�(h�)��}�(hhh]�hV)��}�(h�8�h]�hJ�8�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh j� ubah}�(h]�h]�h]�h]�h]�uhh�h j� ubh�)��}�(hhh]�hV)��}�(h�Nthe latest release of a specific major version (major version 8 in this case).�h]�hJ�Nthe latest release of a specific major version (major version 8 in this case).�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKh j� ubah}�(h]�h]�h]�h]�h]�uhh�h j� ubeh}�(h]�h]�h]�h]�h]�uhh�h j: ubh�)��}�(hhh]�(h�)��}�(hhh]�hV)��}�(h�snapshot�h]�hJ�snapshot�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK!h j� ubah}�(h]�h]�h]�h]�h]�uhh�h j� ubh�)��}�(hhh]�hV)��}�(h�The latest nightly test build.�h]�hJ�The latest nightly test build.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK!h j� ubah}�(h]�h]�h]�h]�h]�uhh�h j� ubeh}�(h]�h]�h]�h]�h]�uhh�h j: ubeh}�(h]�h]�h]�h]�h]�uhj8 h h�ubeh}�(h]�h]�h]�h]�h]��cols�Kuhh�h h�ubah}�(h]�h]�(� longtable��colwidths-given�eh]�h]�h]�uhh�h h&h!hh"h#hNubh%)��}�(hhh]�(h*)��}�(h�PostgreSQL Utilities�h]�hJ�PostgreSQL Utilities�����}�(h j1 h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh)h j. h!hh"h#hK%ubhV)��}�(hX< The PostgreSQL utilities *pg_dump*, *pg_dumpall*, *pg_restore* and *psql* are9included in the container to allow backups to be created and restored and other10maintenance functions to be executed. Multiple versions are included in the11following directories to allow use with different versions of the database12server:�h]�(hJ�The PostgreSQL utilities �����}�(h j? h!hh"NhNubh�)��}�(h� *pg_dump*�h]�hJ�pg_dump�����}�(h jG h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j? ubhJ�, �����}�(h j? h!hh"NhNubh�)��}�(h�*pg_dumpall*�h]�hJ�13pg_dumpall�����}�(h jY h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j? ubhJ�, �����}�h j? sbh�)��}�(h�*pg_restore*�h]�hJ�14pg_restore�����}�(h jk h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j? ubhJ� and �����}�(h j? h!hh"NhNubh�)��}�(h�*psql*�h]�hJ�psql�����}�(h j} h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j? ubhJ�� are15included in the container to allow backups to be created and restored and other16maintenance functions to be executed. Multiple versions are included in the17following directories to allow use with different versions of the database18server:�����}�(h j? h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK'h j. h!hubh �bullet_list���)��}�(hhh]�(h � list_item���)��}�(h�$PostgreSQL 12: */usr/local/pgsql-12*�h]�hV)��}�(hj� h]�(hJ�PostgreSQL 12: �����}�(h j� h!hh"NhNubh�)��}�(h�*/usr/local/pgsql-12*�h]�hJ�/usr/local/pgsql-12�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK-h j� ubah}�(h]�h]�h]�h]�h]�uhj� h"h#hK-h j� h!hubj� )��}�(h�$PostgreSQL 13: */usr/local/pgsql-13*�h]�hV)��}�(hj� h]�(hJ�PostgreSQL 13: �����}�(h j� h!hh"NhNubh�)��}�(h�*/usr/local/pgsql-13*�h]�hJ�/usr/local/pgsql-13�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK.h j� ubah}�(h]�h]�h]�h]�h]�uhj� h"h#hK.h j� h!hubj� )��}�(h�$PostgreSQL 14: */usr/local/pgsql-14*�h]�hV)��}�(hj� h]�(hJ�PostgreSQL 14: �����}�(h j� h!hh"NhNubh�)��}�(h�*/usr/local/pgsql-14*�h]�hJ�/usr/local/pgsql-14�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK/h j� ubah}�(h]�h]�h]�h]�h]�uhj� h"h#hK/h j� h!hubj� )��}�(h�$PostgreSQL 15: */usr/local/pgsql-15*�h]�hV)��}�(hj
h]�(hJ�PostgreSQL 15: �����}�(h j h!hh"NhNubh�)��}�(h�*/usr/local/pgsql-15*�h]�hJ�/usr/local/pgsql-15�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j ubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK0h j ubah}�(h]�h]�h]�h]�h]�uhj� h"h#hK0h j� h!hubj� )��}�(h�%PostgreSQL 16: */usr/local/pgsql-16*19�h]�hV)��}�(h�$PostgreSQL 16: */usr/local/pgsql-16*�h]�(hJ�PostgreSQL 16: �����}�(h j4 h!hh"NhNubh�)��}�(h�*/usr/local/pgsql-16*�h]�hJ�/usr/local/pgsql-16�����}�(h j< h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j4 ubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK1h j0 ubah}�(h]�h]�h]�h]�h]�uhj� h"h#hK1h j� h!hubeh}�(h]�h]�h]�h]�h]��bullet��*�uhj� h"h#hK-h j. h!hubhV)��}�(h�=The default binary paths set in the container are as follows:�h]�hJ�=The default binary paths set in the container are as follows:�����}�(h j^ h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK3h j. h!hubh�)��}�(h��DEFAULT_BINARY_PATHS = {20 'pg-16': '/usr/local/pgsql-16',21 'pg-15': '/usr/local/pgsql-15',22 'pg-14': '/usr/local/pgsql-14',23 'pg-13': '/usr/local/pgsql-13',24 'pg-12': '/usr/local/pgsql-12'25}�h]�hJ��DEFAULT_BINARY_PATHS = {26 'pg-16': '/usr/local/pgsql-16',27 'pg-15': '/usr/local/pgsql-15',28 'pg-14': '/usr/local/pgsql-14',29 'pg-13': '/usr/local/pgsql-13',30 'pg-12': '/usr/local/pgsql-12'31}�����}�h jl sbah}�(h]�h]�h]�h]�h]�h�h�h��h��bash�h�}�uhh�h"h#hK5h j. h!hubhV)��}�(h�.this may be changed in the :ref:`preferences`.�h]�(hJ�this may be changed in the �����}�(h j| h!hh"NhNubh �pending_xref���)��}�(h�:ref:`preferences`�h]�h �inline���)��}�(hj� h]�hJ�preferences�����}�(h j� h!hh"NhNubah}�(h]�h]�(�xref��std��std-ref�eh]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]��refdoc��container_deployment�� refdomain�j� �reftype��ref��refexplicit���refwarn��� reftarget��preferences�uhj� h"h#hK?h j| ubhJ�.�����}�(h j| h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK?h j. h!hubeh}�(h]��postgresql-utilities�ah]�h]��postgresql utilities�ah]�h]�uhh$h h&h!hh"h#hK%ubh%)��}�(hhh]�(h*)��}�(h�Environment Variables�h]�hJ�Environment Variables�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh)h j� h!hh"h#hKBubhV)��}�(h�=The container will accept the following variables at startup:�h]�hJ�=The container will accept the following variables at startup:�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKDh j� h!hubhV)��}�(h�**PGADMIN_DEFAULT_EMAIL**�h]�h �strong���)��}�(hj� h]�hJ�PGADMIN_DEFAULT_EMAIL�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKFh j� h!hubhV)��}�(h��This is the email address used when setting up the initial administrator account32to login to pgAdmin. This variable is required and must be set at launch time.�h]�hJ��This is the email address used when setting up the initial administrator account33to login to pgAdmin. This variable is required and must be set at launch time.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKHh j� h!hubhV)��}�(h�**PGADMIN_DEFAULT_PASSWORD**�h]�j� )��}�(hj h]�hJ�PGADMIN_DEFAULT_PASSWORD�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKKh j� h!hubhV)��}�(h��This is the password used when setting up the initial administrator account to34login to pgAdmin. This variable is required and must be set at launch time.�h]�hJ��This is the password used when setting up the initial administrator account to35login to pgAdmin. This variable is required and must be set at launch time.�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKMh j� h!hubhV)��}�(h�!**PGADMIN_DEFAULT_PASSWORD_FILE**�h]�j� )��}�(hj* h]�hJ�PGADMIN_DEFAULT_PASSWORD_FILE�����}�(h j, h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j( ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKPh j� h!hubhV)��}�(hX� This is the password used when setting up the initial administrator account to36login to pgAdmin. This value should be set to *docker secret* in order to set37the password. This variable is supported in docker swarm environment or while creating38container with docker compose. PGADMIN_DEFAULT_PASSWORD or PGADMIN_DEFAULT_PASSWORD_FILE39variable is required and must be set at launch time.�h]�(hJ�}This is the password used when setting up the initial administrator account to40login to pgAdmin. This value should be set to �����}�(h j? h!hh"NhNubh�)��}�(h�*docker secret*�h]�hJ�
docker secret�����}�(h jG h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j? ubhJ�� in order to set41the password. This variable is supported in docker swarm environment or while creating42container with docker compose. PGADMIN_DEFAULT_PASSWORD or PGADMIN_DEFAULT_PASSWORD_FILE43variable is required and must be set at launch time.�����}�(h j? h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hKRh j� h!hubhV)��}�(h�**PGADMIN_DISABLE_POSTFIX**�h]�j� )��}�(hja h]�hJ�PGADMIN_DISABLE_POSTFIX�����}�(h jc h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j_ ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKXh j� h!hubhV)��}�(h�*Default: <null>*�h]�h�)��}�(hjx h]�hJ�Default: <null>�����}�(h jz h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h jv ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKZh j� h!hubhV)��}�(h�QIf left unset, a Postfix server will be started to deliver password reset44emails.�h]�hJ�QIf left unset, a Postfix server will be started to deliver password reset45emails.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK\h j� h!hubhV)��}�(h��If set to any value, the Postfix server will not be started, and pgAdmin will46need to be configured to use an external mail server using the *PGADMIN_CONFIG_*47options below.�h]�(hJ��If set to any value, the Postfix server will not be started, and pgAdmin will48need to be configured to use an external mail server using the �����}�(h j� h!hh"NhNubh�)��}�(h�*PGADMIN_CONFIG_*�h]�hJ�PGADMIN_CONFIG_�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubhJ�49options below.�����}�(h j� h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK_h j� h!hubhV)��}�(h��This option is useful if you're running in an environment that prevents the use50of sudo to start Postfix, or if you wish to use an external mail server.�h]�hJ��This option is useful if you’re running in an environment that prevents the use51of sudo to start Postfix, or if you wish to use an external mail server.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKch j� h!hubhV)��}�(h�**PGADMIN_ENABLE_TLS**�h]�j� )��}�(hj� h]�hJ�PGADMIN_ENABLE_TLS�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKfh j� h!hubhV)��}�(h�*Default: <null>*�h]�h�)��}�(hj� h]�hJ�Default: <null>�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKhh j� h!hubhV)��}�(h��If left un-set, the container will listen on port 80 for connections in plain52text. If set to any value, the container will listen on port 443 for TLS53connections.�h]�hJ��If left un-set, the container will listen on port 80 for connections in plain54text. If set to any value, the container will listen on port 443 for TLS55connections.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKjh j� h!hubhV)��}�(h��When TLS is enabled, a certificate and key must be provided. Typically these56should be stored on the host file system and mounted from the container. The57expected paths are /certs/server.cert and /certs/server.key�h]�hJ��When TLS is enabled, a certificate and key must be provided. Typically these58should be stored on the host file system and mounted from the container. The59expected paths are /certs/server.cert and /certs/server.key�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKnh j� h!hubhV)��}�(h�**PGADMIN_LISTEN_ADDRESS**�h]�j� )��}�(hj h]�hJ�PGADMIN_LISTEN_ADDRESS�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKrh j� h!hubhV)��}�(h�*Default: [::]*�h]�h�)��}�(hj, h]�hJ�
Default: [::]�����}�(h j. h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j* ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKth j� h!hubhV)��}�(h��Specify the local address that the servers listens on. The default should work60for most users - in IPv4-only environments, this may need to be set to610.0.0.0.�h]�hJ��Specify the local address that the servers listens on. The default should work62for most users - in IPv4-only environments, this may need to be set to630.0.0.0.�����}�(h jA h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKvh j� h!hubhV)��}�(h�**PGADMIN_LISTEN_PORT**�h]�j� )��}�(hjQ h]�hJ�PGADMIN_LISTEN_PORT�����}�(h jS h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h jO ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hKzh j� h!hubhV)��}�(h�(*Default: 80 or 443 (if TLS is enabled)*�h]�h�)��}�(hjh h]�hJ�&Default: 80 or 443 (if TLS is enabled)�����}�(h jj h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h jf ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK|h j� h!hubhV)��}�(h�gAllows the port that the server listens on to be set to a specific value rather64than using the default.�h]�hJ�gAllows the port that the server listens on to be set to a specific value rather65than using the default.�����}�(h j} h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK~h j� h!hubhV)��}�(h�**PGADMIN_SERVER_JSON_FILE**�h]�j� )��}�(hj� h]�hJ�PGADMIN_SERVER_JSON_FILE�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�!*Default: /pgadmin4/servers.json*�h]�h�)��}�(hj� h]�hJ�Default: /pgadmin4/servers.json�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(hX Override the default file path for the server definition list. See the66/pgadmin4/servers.json mapped file below for more information. See the format67of the `Servers JSON file <https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html#json-format>`_.�h]�(hJ��Override the default file path for the server definition list. See the68/pgadmin4/servers.json mapped file below for more information. See the format69of the �����}�(h j� h!hh"NhNubhp)��}�(h�j`Servers JSON file <https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html#json-format>`_�h]�hJ�Servers JSON file�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]��name��Servers JSON file��refuri��Shttps://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html#json-format�uhhoh j� ubh)��}�(h�V <https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html#json-format>�h]�h}�(h]��servers-json-file�ah]�h]��servers json file�ah]�h]��refuri�j� uhh70�71referenced�Kh j� ubhJ�.�����}�(h j� h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�!**PGADMIN_PREFERENCES_JSON_FILE**�h]�j� )��}�(hj� h]�hJ�PGADMIN_PREFERENCES_JSON_FILE�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�%*Default: /pgadmin4/preferences.json*�h]�h�)��}�(hj h]�hJ�#Default: /pgadmin4/preferences.json�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(hX" Override the default file path for the preferences customization at the container creation. See the72/pgadmin4/preferences.json mapped file below for more information. See the format73of the `Preferences JSON file <https://www.pgadmin.org/docs/pgadmin4/latest/preferences.html#json-format>`_.�h]�(hJ��Override the default file path for the preferences customization at the container creation. See the74/pgadmin4/preferences.json mapped file below for more information. See the format75of the �����}�(h j h!hh"NhNubhp)��}�(h�d`Preferences JSON file <https://www.pgadmin.org/docs/pgadmin4/latest/preferences.html#json-format>`_�h]�hJ�Preferences JSON file�����}�(h j! h!hh"NhNubah}�(h]�h]�h]�h]�h]��name��Preferences JSON file�j� �Ihttps://www.pgadmin.org/docs/pgadmin4/latest/preferences.html#json-format�uhhoh j ubh)��}�(h�L <https://www.pgadmin.org/docs/pgadmin4/latest/preferences.html#json-format>�h]�h}�(h]��preferences-json-file�ah]�h]��preferences json file�ah]�h]��refuri�j1 uhh76j� Kh j ubhJ�.�����}�(h j h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�**GUNICORN_ACCESS_LOGFILE**�h]�j� )��}�(hjK h]�hJ�GUNICORN_ACCESS_LOGFILE�����}�(h jM h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h jI ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�*Default: -* (stdout)�h]�(h�)��}�(h�*Default: -*�h]�hJ�77Default: -�����}�(h jd h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j` ubhJ� (stdout)�����}�(h j` h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�eSpecify an output file in which to store the Gunicorn access logs, instead of78sending them to stdout.�h]�hJ�eSpecify an output file in which to store the Gunicorn access logs, instead of79sending them to stdout.�����}�(h j| h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�**GUNICORN_LIMIT_REQUEST_LINE**�h]�j� )��}�(hj� h]�hJ�GUNICORN_LIMIT_REQUEST_LINE�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�*Default: 8190*�h]�h�)��}�(hj� h]�hJ�
Default: 8190�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(hX3 Set the maximum size of HTTP request line in bytes. By default the pgAdmin80container uses the maximum limited size offered by Gunicorn as some requests81can be quite large. In exceptional cases this value can be set to 0 (zero) to82specify "unlimited", however this poses a potential denial of service hazard.�h]�hJX7 Set the maximum size of HTTP request line in bytes. By default the pgAdmin83container uses the maximum limited size offered by Gunicorn as some requests84can be quite large. In exceptional cases this value can be set to 0 (zero) to85specify “unlimited”, however this poses a potential denial of service hazard.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�**GUNICORN_THREADS**�h]�j� )��}�(hj� h]�hJ�GUNICORN_THREADS�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�
*Default: 25*�h]�h�)��}�(hj� h]�hJ�Default: 25�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h��Adjust the number of threads the Gunicorn server uses to handle incoming86requests. This should typically be left as-is, except in highly loaded systems87where it may be increased.�h]�hJ��Adjust the number of threads the Gunicorn server uses to handle incoming88requests. This should typically be left as-is, except in highly loaded systems89where it may be increased.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�**PGADMIN_CONFIG_***�h]�j� )��}�(hj h]�hJ�PGADMIN_CONFIG_*�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(hX@ This is a variable prefix that can be used to override any of the configuration90options in pgAdmin's *config.py* file. Add the *PGADMIN_CONFIG_* prefix to any91variable name from *config.py* and give the value in the format 'string value'92for strings, True/False for booleans or 123 for numbers. See below for an93example.�h]�(hJ�gThis is a variable prefix that can be used to override any of the configuration94options in pgAdmin’s �����}�(h j h!hh"NhNubh�)��}�(h�*config.py*�h]�hJ� config.py�����}�(h j! h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j ubhJ� file. Add the �����}�(h j h!hh"NhNubh�)��}�(h�*PGADMIN_CONFIG_*�h]�hJ�PGADMIN_CONFIG_�����}�(h j3 h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j ubhJ�" prefix to any95variable name from �����}�(h j h!hh"NhNubh�)��}�(h�*config.py*�h]�hJ� config.py�����}�(h jE h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j ubhJ�� and give the value in the format ‘string value’96for strings, True/False for booleans or 123 for numbers. See below for an97example.�����}�(h j h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(hX Settings are written to */pgadmin4/config_distro.py* within the container, which98is read after */pgadmin4/config.py* and before */pgadmin4/config_local.py*.99Any settings given will therefore override anything in config.py, but can be100overridden by settings in config_local.py.�h]�(hJ�Settings are written to �����}�(h j] h!hh"NhNubh�)��}�(h�*/pgadmin4/config_distro.py*�h]�hJ�/pgadmin4/config_distro.py�����}�(h je h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j] ubhJ�+ within the container, which101is read after �����}�(h j] h!hh"NhNubh�)��}�(h�*/pgadmin4/config.py*�h]�hJ�/pgadmin4/config.py�����}�(h jw h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j] ubhJ� and before �����}�(h j] h!hh"NhNubh�)��}�(h�*/pgadmin4/config_local.py*�h]�hJ�/pgadmin4/config_local.py�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j] ubhJ�y.102Any settings given will therefore override anything in config.py, but can be103overridden by settings in config_local.py.�����}�(h j] h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(hX} Settings are only written to */pgadmin4/config_distro.py* once, typically on104first launch of the container. If */pgadmin4/config_distro.py* contains one or105more lines, then no changes are made; for example, if the container instance is106restarted, or */pgadmin4/config_distro.py* is mapped to a file on persistent107storage (not recommended - use */pgadmin4/config_local.py* instead)!�h]�(hJ�Settings are only written to �����}�(h j� h!hh"NhNubh�)��}�(h�*/pgadmin4/config_distro.py*�h]�hJ�/pgadmin4/config_distro.py�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubhJ�6 once, typically on108first launch of the container. If �����}�(h j� h!hh"NhNubh�)��}�(h�*/pgadmin4/config_distro.py*�h]�hJ�/pgadmin4/config_distro.py�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubhJ�o contains one or109more lines, then no changes are made; for example, if the container instance is110restarted, or �����}�(h j� h!hh"NhNubh�)��}�(h�*/pgadmin4/config_distro.py*�h]�hJ�/pgadmin4/config_distro.py�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubhJ�B is mapped to a file on persistent111storage (not recommended - use �����}�(h j� h!hh"NhNubh�)��}�(h�*/pgadmin4/config_local.py*�h]�hJ�/pgadmin4/config_local.py�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubhJ�112 instead)!�����}�(h j� h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubhV)��}�(h�RSee :ref:`config_py` for more information on the available configuration settings.�h]�(hJ�See �����}�(h j� h!hh"NhNubj� )��}�(h�:ref:`config_py`�h]�j� )��}�(hj h]�hJ� config_py�����}�(h j h!hh"NhNubah}�(h]�h]�(j� �std��std-ref�eh]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]��refdoc�j� � refdomain�j
�reftype��ref��refexplicit���refwarn��j� � config_py�uhj� h"h#hK�h j� ubhJ�> for more information on the available configuration settings.�����}�(h j� h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j� h!hubeh}�(h]��environment-variables�ah]�h]��environment variables�ah]�h]�uhh$h h&h!hh"h#hKBubh%)��}�(hhh]�(h*)��}�(h�Mapped Files and Directories�h]�hJ�Mapped Files and Directories�����}�(h j4 h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh)h j1 h!hh"h#hK�ubhV)��}�(h��The following files or directories can be mapped from the container onto the113host machine to allow configuration to be customised and shared between114instances.�h]�hJ��The following files or directories can be mapped from the container onto the115host machine to allow configuration to be customised and shared between116instances.�����}�(h jB h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubh �warning���)��}�(hX� Warning: pgAdmin runs as the *pgadmin* user (UID: 5050) in the117*pgadmin* group (GID: 5050) in the container. You must ensure that all files118are readable, and where necessary (e.g. the working/session directory)119writeable for this user on the host machine. For example:120 121.. code-block:: bash122 123 sudo chown -R 5050:5050 <host_directory>124 125On some filesystems that do not support extended attributes, it may not be126possible to run pgAdmin without specifying a value for *PGADMIN_LISTEN_PORT*127that is greater than 1024. In such cases, specify an alternate port when128launching the container by adding the environment variable, for example:129 130.. code-block:: bash131 132 -e 'PGADMIN_LISTEN_PORT=5050'133 134Don't forget to adjust any host-container port mapping accordingly.�h]�(hV)��}�(hX Warning: pgAdmin runs as the *pgadmin* user (UID: 5050) in the135*pgadmin* group (GID: 5050) in the container. You must ensure that all files136are readable, and where necessary (e.g. the working/session directory)137writeable for this user on the host machine. For example:�h]�(hJ�Warning: pgAdmin runs as the �����}�(h jV h!hh"NhNubh�)��}�(h� *pgadmin*�h]�hJ�pgadmin�����}�(h j^ h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h jV ubhJ� user (UID: 5050) in the138�����}�(h jV h!hh"NhNubh�)��}�(h� *pgadmin*�h]�hJ�pgadmin�����}�(h jp h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h jV ubhJ�� group (GID: 5050) in the container. You must ensure that all files139are readable, and where necessary (e.g. the working/session directory)140writeable for this user on the host machine. For example:�����}�(h jV h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h jR ubh�)��}�(h�(sudo chown -R 5050:5050 <host_directory>�h]�hJ�(sudo chown -R 5050:5050 <host_directory>�����}�h j� sbah}�(h]�h]�h]�h]�h]�h�h�h��h��bash�h�}�uhh�h"h#hK�h jR ubhV)��}�(hX) On some filesystems that do not support extended attributes, it may not be141possible to run pgAdmin without specifying a value for *PGADMIN_LISTEN_PORT*142that is greater than 1024. In such cases, specify an alternate port when143launching the container by adding the environment variable, for example:�h]�(hJ��On some filesystems that do not support extended attributes, it may not be144possible to run pgAdmin without specifying a value for �����}�(h j� h!hh"NhNubh�)��}�(h�*PGADMIN_LISTEN_PORT*�h]�hJ�PGADMIN_LISTEN_PORT�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j� ubhJ��145that is greater than 1024. In such cases, specify an alternate port when146launching the container by adding the environment variable, for example:�����}�(h j� h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h jR ubh�)��}�(h�-e 'PGADMIN_LISTEN_PORT=5050'�h]�hJ�-e 'PGADMIN_LISTEN_PORT=5050'�����}�h j� sbah}�(h]�h]�h]�h]�h]�h�h�h��h��bash�h�}�uhh�h"h#hK�h jR ubhV)��}�(h�CDon't forget to adjust any host-container port mapping accordingly.�h]�hJ�EDon’t forget to adjust any host-container port mapping accordingly.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h jR ubeh}�(h]�h]�h]�h]�h]�uhjP h"h#hK�h j1 h!hubhV)��}�(h�**/var/lib/pgadmin**�h]�j� )��}�(hj� h]�hJ�/var/lib/pgadmin�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(hX This is the working directory in which pgAdmin stores session data, user files,147configuration files, and it's configuration database. Mapping this directory148onto the host machine gives you an easy way to maintain configuration between149invocations of the container.�h]�hJX150 This is the working directory in which pgAdmin stores session data, user files,151configuration files, and it’s configuration database. Mapping this directory152onto the host machine gives you an easy way to maintain configuration between153invocations of the container.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(h�**/pgadmin4/config_local.py**�h]�j� )��}�(hj h]�hJ�/pgadmin4/config_local.py�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(hX, This file can be used to override configuration settings in pgAdmin. Settings154found in config.py can be overridden with deployment specific values if155required. Settings in config_local.py will also override anything specified in156the container environment through *PGADMIN_CONFIG_* prefixed variables.�h]�(hJX This file can be used to override configuration settings in pgAdmin. Settings157found in config.py can be overridden with deployment specific values if158required. Settings in config_local.py will also override anything specified in159the container environment through �����}�(h j h!hh"NhNubh�)��}�(h�*PGADMIN_CONFIG_*�h]�hJ�PGADMIN_CONFIG_�����}�(h j h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh�h j ubhJ� prefixed variables.�����}�(h j h!hh"NhNubeh}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(h�**/pgadmin4/servers.json**�h]�j� )��}�(hj: h]�hJ�/pgadmin4/servers.json�����}�(h j< h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j8 ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(hXm If this file is mapped, server definitions found in it will be loaded at launch160time. This allows connection information to be pre-loaded into the instance of161pgAdmin in the container. Note that server definitions are only loaded on first162launch, i.e. when the configuration database is created, and not on subsequent163launches using the same configuration database.�h]�hJXm If this file is mapped, server definitions found in it will be loaded at launch164time. This allows connection information to be pre-loaded into the instance of165pgAdmin in the container. Note that server definitions are only loaded on first166launch, i.e. when the configuration database is created, and not on subsequent167launches using the same configuration database.�����}�(h jO h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(h�**/pgadmin4/preferences.json**�h]�j� )��}�(hj_ h]�hJ�/pgadmin4/preferences.json�����}�(h ja h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j] ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(hX] If this file is mapped, preferences defined in it will be updated at launch168time. This allows customization of preferences settings into the instance of169pgAdmin in the container. Note that preferences are only set on first170launch, i.e. when the configuration database is created, and not on subsequent171launches using the same configuration database.�h]�hJX] If this file is mapped, preferences defined in it will be updated at launch172time. This allows customization of preferences settings into the instance of173pgAdmin in the container. Note that preferences are only set on first174launch, i.e. when the configuration database is created, and not on subsequent175launches using the same configuration database.�����}�(h jt h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(h�**/certs/server.cert**�h]�j� )��}�(hj� h]�hJ�/certs/server.cert�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(h�IIf TLS is enabled, this file will be used as the servers TLS certificate.�h]�hJ�IIf TLS is enabled, this file will be used as the servers TLS certificate.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(h�**/certs/server.key**�h]�j� )��}�(hj� h]�hJ�/certs/server.key�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhj� h j� ubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubhV)��}�(h�ZIf TLS is enabled, this file will be used as the key file for the servers TLS176certificate.�h]�hJ�ZIf TLS is enabled, this file will be used as the key file for the servers TLS177certificate.�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hK�h j1 h!hubeh}�(h]��mapped-files-and-directories�ah]�h]��mapped files and directories�ah]�h]�uhh$h h&h!hh"h#hK�ubh%)��}�(hhh]�(h*)��}�(h�Examples�h]�hJ�Examples�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhh)h j� h!hh"h#hMubhV)��}�(h�$Run a simple container over port 80:�h]�hJ�$Run a simple container over port 80:�����}�(h j� h!hh"NhNubah}�(h]�h]�h]�h]�h]�uhhUh"h#hMh j� h!hubh�)��}�(h��docker pull dpage/pgadmin4178docker run -p 80:80 \179 -e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \180 -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \181 -d dpage/pgadmin4�h]�hJ��docker pull dpage/pgadmin4182docker run -p 80:80 \183 -e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \184 -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \185 -d dpage/pgadmin4�����}�h j� sbah}�(h]�h]�h]�h]�h]�h�h�h��h��bash�h�}�uhh�h"h#hMh j� h!hubhV)��}�(h�HRun a simple container over port 80, setting some configuration options:�h]�hJ�HRun a simple container over port 80, setting some configuration options:�����}�(h j186