@@ -99,11 +99,49 @@ simple - adapt as required for your distribution:
9999 (venv) $ pip install -r $PGADMIN4_SRC /web/regression/requirements.txt
100100 ```
101101
102- 5 . Create a local configuration file for pgAdmin. Edit
102+ 5 . Create a local Postgres database, if necessary.
103+
104+ If you already have a running Postgres instance, you can skip this step. If not,
105+ the easiest way to create one would be using [ Docker] ( https://www.docker.com ) . First,
106+ pull the latest Postgres docker image:
107+
108+ ``` bash
109+ docker pull postgres
110+ ```
111+
112+ Next, start a Docker container using the image using the following command line:
113+
114+ ``` bash
115+ docker run --name postgres -e POSTGRES_PASSWORD=postgres -p:5432:5432 -d postgres
116+ ```
117+
118+ Feel free to use any friendly value for the ` --name ` parameter, and change the password
119+ if desired.
120+
121+ Next, run the ` psql ` client. If you don't have the Postgres client tools installed, you
122+ can simply run them from within the container:
123+
124+ ``` bash
125+ docker exec -it postgres sh -c " psql -h localhost -p 5432 -U postgres"
126+ ```
127+
128+ You should see a ` postgres=# ` prompt, where you can now create a database for pgAdmin to use:
129+
130+ ``` SQL
131+ CREATE DATABASE pgadmin ;
132+ ```
133+
134+ You can now ` exit ` psql and continue to step 6.
135+
136+
137+ 6 . Create a local configuration file for pgAdmin. Edit
103138 $PGADMIN4_SRC/web/config_local.py and add any desired configuration options
104139 (use the config.py file as a reference - any settings duplicated in
105- config_local.py will override those in config.py). A typical development
106- configuration may look like:
140+ config_local.py will override those in config.py). If you created a Postgres docker
141+ container in Step 5, note the port on the ` CONFIG_DATABASE_URI ` connection string
142+ will need to match, as well as the password specified on the command line.
143+
144+ A typical development configuration may look like:
107145
108146 ``` python
109147 import os
@@ -120,7 +158,7 @@ simple - adapt as required for your distribution:
120158 SERVER_MODE = True
121159
122160 # Change pgAdmin config DB path in case external DB is used.
123- CONFIG_DATABASE_URI = " postgresql://postgres:postgres@localhost:5436 /pgadmin"
161+ CONFIG_DATABASE_URI = " postgresql://postgres:postgres@localhost:5432 /pgadmin"
124162
125163 # Setup SMTP
126164 MAIL_SERVER = ' smtp.gmail.com'
@@ -149,12 +187,12 @@ simple - adapt as required for your distribution:
149187 This configuration allows easy switching between server and desktop modes
150188 for testing.
151189
152- 6 . The initial setup of the configuration database is interactive in server
190+ 7 . The initial setup of the configuration database is interactive in server
153191 mode, and non-interactive in desktop mode. You can run it either by
154192 running:
155193
156194 ``` bash
157- (venv) $ python3 $PGADMIN4_SRC /web/setup.py
195+ (venv) $ python3 $PGADMIN4_SRC /web/setup.py setup-db
158196 ```
159197
160198 or by starting pgAdmin 4:
0 commit comments