Pgadmin configuration issues

From: Hardik Sanghavi <sanhardik(at)gmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Pgadmin configuration issues
Date: 2024-02-28 11:08:32
Message-ID: CAK5+LPuOaKBQRCa=SeJVVQrw3obn9Ew3k2wFHbHuYvezojjAEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hello,
Following up from https://github.com/pgadmin-org/pgadmin4/issues/7074,

I am trying to run pgadmin in a docker container. My intention is for the
users to see all the servers and not to enter password. However I keep on
getting error where its not able to find the password.

*My docker config:*
db-rl:
image: dpage/pgadmin4:latest
entrypoint: >
/bin/sh -c "
mkdir -p /var/lib/pgadmin/storage/admin_abc.com/;
echo '*:*:*:postgres:pass' >> /var/lib/pgadmin/storage/
admin_abc.com/.pgpass;
echo '' >> /var/lib/pgadmin/storage/admin_abc.com/.pgpass;
chown pgadmin:root /var/lib/pgadmin/storage/admin_abc.com/.pgpass;
chmod 600 /var/lib/pgadmin/storage/admin_abc.com/.pgpass;
/entrypoint.sh
"
environment:
- PGADMIN_DEFAULT_EMAIL=admin(at)abc(dot)com
- PGADMIN_DEFAULT_PASSWORD=password
networks:
rdcnet: {}
#volumes:
#- /srv/pgadmin4:/var/lib/pgadmin
secrets:
- source: pgadmin_config_20240223_4
target: /pgadmin4/config_local.py
- source: pgadmin_servers_20240228_1
target: /pgadmin4/servers.json
secrets:
pgadmin_config_20240223_4:
file: ./config/pgadmin.py
pgadmin_servers_20240228_1:
file: ./config/pgadmin_servers.json

*config_local.py*
AUTHENTICATION_SOURCES = ['oauth2']
OAUTH2_CONFIG = [
{
'OAUTH2_NAME': 'Google',
'OAUTH2_DISPLAY_NAME': 'Google',
'OAUTH2_CLIENT_ID': '
69794626965-fiq1hjp6udv48ghvjrq0iaulfonsa4fs.apps.googleusercontent.com',
'OAUTH2_CLIENT_SECRET': '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',
'OAUTH2_TOKEN_URL': 'https://oauth2.googleapis.com/token',
'OAUTH2_AUTHORIZATION_URL': '
https://accounts.google.com/o/oauth2/v2/auth',
'OAUTH2_SERVER_METADATA_URL': '
https://accounts.google.com/.well-known/openid-configuration',
'OAUTH2_API_BASE_URL': 'https://openidconnect.googleapis.com/v1/',
'OAUTH2_USERINFO_ENDPOINT': 'userinfo',
'OAUTH2_SCOPE': 'openid email profile',
'OAUTH2_ICON': 'fa-google',
'OAUTH2_BUTTON_COLOR': '#3253a8',
}
]
PGADMIN_CONFIG_CONSOLE_LOG_LEVEL = 10
MASTER_PASSWORD_REQUIRED= False

*servers.json*
{
"Servers": {
"1": {
"Name": "Staging (16.169)",
"Group": "Servers",
"Host": "192.168.16.169",
"Port": 5432,
"MaintenanceDB": "postgres",
"Username": "postgres",
"SharedUsername": "postgres",
"Shared": true,
"PassFile": ".pgpass",
"ConnectionParameters": {
"passfile": ".pgpass"
}
},
}

I would really appreciate some help

--
Thanks,
Hardik Sanghavi

Browse pgadmin-support by date

  From Date Subject
Next Message Marcello Z Fabila 2024-03-01 05:34:30 pgAdmin4 Installation Issues
Previous Message Pravesh Sharma 2024-02-21 14:07:53 Re: I am unable to Open the app