Closed koliacv closed 12 months ago
Fixed for me I've added to my docker-compose environment PGADMIN_CONFIG_CONFIG_DATABASE_URI: '''postgresql://pgadmin_user:Passw0rd1@admin-postgre.clnajs.us-east-2.rds.amazonaws.com:5432/pgadmin'''
Now it looks like:
pgadmin:
image: dpage/pgadmin4
# restart: always
deploy:
placement:
constraints: [node.role==worker]
max_replicas_per_node: 1
restart_policy:
condition: any
delay: 5s
ports:
- "5050:80"
volumes:
- /local/pgadmin/:/pgadmin4/pgadmin_custom
- /local/pgadmin/config.py:/pgadmin4/config.py
environment:
# External Database
PGADMIN_CONFIG_CONFIG_DATABASE_URI: '''postgresql://pgadmin_user:Passw0rd1@admin-postgre.clnajs.us-east-2.rds.amazonaws.com:5432/pgadmin'''
# Default User params
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: P@ssw0rd!
# Pre-defined databases
PGADMIN_SERVER_JSON_FILE: /pgadmin4/pgadmin_custom/servers_conf/servers.json
# CSRF token
PGADMIN_CONFIG_WTF_CSRF_CHECK_DEFAULT: 'False'
PGADMIN_CONFIG_WTF_CSRF_ENABLED: 'False
Great! @koliacv. Please note that it is not recommended to change config.py directly. Read more here - https://www.pgadmin.org/docs/pgadmin4/development/config_py.html
We encountered a ModuleNotFoundError during the initialization sequence of database drivers in pgAdmin 4. Specifically, the system cannot find the required module named 'psycopg' when attempting to load the PostgreSQL driver module. This issue is occurring within the database driver loading mechanism, suggesting a possible missing dependency or misconfiguration in the environment.
Environment:
pgAdmin 4 Version: 7.8
Steps to Reproduce:
Start pgAdmin 4 application using official docker image .
The application initialization process begins.
During the driver initialization phase, the system attempts to import 'psycopg'
Expected Result: pgAdmin 4 should load all necessary database drivers, including the PostgreSQL driver module 'psycopg3', without any import errors.
Actual Result: The initialization process fails with a ModuleNotFoundError indicating that the 'psycopg' module cannot be found.
Error Message:
Additional Information: The Docker environment is based on the Docker image which you provided on Dockerhub with the changed config.py file in it with the next context: