Skip to content

Commit

Permalink
feat: Update PostgreSQL configuration for socket file location
Browse files Browse the repository at this point in the history
This commit updates the PostgreSQL configuration to use the `/var/run/postgresql` directory as the location for the socket file. This change ensures that the socket file is accessible for communication with the PostgreSQL server.
  • Loading branch information
stephdl committed Jun 20, 2024
1 parent 6b976a7 commit 03630d2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions imageroot/state/config_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"Group": "Localhost server",
"Port": 5432,
"Username": "postgres",
"Host": "127.0.0.1",
"Host": "/var/run/postgresql/",
"MaintenanceDB": "postgres",
"PassFile": "/pgpassfile"
"PassFile": ""
}
}
}
1 change: 0 additions & 1 deletion imageroot/state/pgpassfile

This file was deleted.

3 changes: 1 addition & 2 deletions imageroot/systemd/user/pgadmin-app.service
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ ExecStart=/usr/bin/podman run --conmon-pidfile %t/pgadmin-app.pid \
--pod-id-file %t/postgresql.pod-id --replace -d --name pgadmin-app \
--volume pgadmin-data:/var/lib/pgadmin:Z \
--volume ./config_server.json:/pgadmin4/config_server.json:Z \
--volume ./pgpassfile:/pgadmin4/pgpassfile:Z \
--volume socket:/var/run/postgresql:z \
--env '[email protected]' \
--env 'PGADMIN_DEFAULT_PASSWORD=Nethesis,1234' \
--env 'PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=True' \
--env 'PGADMIN_CONFIG_UPGRADE_CHECK_ENABLED=False' \
--env 'PGADMIN_CONFIG_LOGIN_BANNER="Authorised users only!"' \
--env 'PGADMIN_CONFIG_CONSOLE_LOG_LEVEL=40' \
--env 'PGADMIN_CONFIG_CONFIG_DATABASE_URI="postgresql://postgres:${POSTGRES_PASSWORD}@127.0.0.1:5432/postgres"' \
--env-file=%S/state/smarthost.env \
${PGADMIN4_IMAGE}
ExecStartPost=/usr/bin/bash -c "while ! podman exec pgadmin-app /venv/bin/python3 setup.py get-users ; do sleep 5 ; done"
Expand Down
1 change: 1 addition & 0 deletions imageroot/systemd/user/postgresql-app.service
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ExecStart=/usr/bin/podman run --conmon-pidfile %t/postgresql-app.pid \
--pod-id-file %t/postgresql.pod-id --replace -d --name postgresql-app \
--env-file=%S/state/environment \
--volume pgdata:/var/lib/postgresql/data:Z \
--volume socket:/var/run/postgresql:z \
--env POSTGRES_USER=postgres \
--env POSTGRES_PASSWORD=${POSTGRES_PASSWORD} \
${POSTGRES_IMAGE}
Expand Down

0 comments on commit 03630d2

Please sign in to comment.