digitalmethodsinitiative / 4cat

The 4CAT Capture and Analysis Toolkit provides modular data capture & analysis for a variety of social media platforms.
Other
246 stars 59 forks source link

Feature request: allow additional database options #426

Open dale-wahl opened 5 months ago

dale-wahl commented 5 months ago

It ought to be possible to allow further configuration of database connections (a PR was proposed but needed additional work https://github.com/digitalmethodsinitiative/4cat/pull/285). Instead of individual parameters being stored in the .env file and config.ini file, psql allows strings to be passed.

E.g. psql --host=$POSTGRES_HOST --port=$POSTGRES_PORT --user=$POSTGRES_USER --dbname=$POSTGRES_DB becomes psql "host=$POSTGRES_HOST port=$POSTGRES_PORT user=$POSTGRES_USER password=$POSTGRES_PASSWORD dbname=$POSTGRES_DB".

To make that change, it would have to work with both psql in files like docker/docker-entrypoint.sh as well as with our Database class. And the string would need to be passed via docker/docker_setup.py to the [https://github.com/digitalmethodsinitiative/4cat/blob/master/common/config_manager.py](config manager).

Opening this issue to track any need/interest of such a feature.