dathere/datapusher-plus

.env is not considered

Opened this issue · 3 comments

BPMCRA commented

My file /etc/ckan/datapusher-plus/.env is not considered.
I had to edit /usr/lib/ckan/dpplus_venv/lib/python3.8/site-packages/datapusher/config.py so that datapusher can push a more big file than 25 Mo and connect to my datastore database.

Ubuntu 22.04
Production installation.

Hmmm... The .env file will need to be in the current working directory of the program for it to be considered.

Can you try moving the .env file to the /usr/lib/ckan/dpplus_venv/bin directory?

I have the same problem but with the Dockerised version. Weirdly enough, the
SQLALCHEMY_DATABASE_URI vars from the same env file is considered, the rest are just ignored and using defaults instead.
It does not connect to the datastore on the URL provided through .env. Still tries to use localhost:5432, but writes to datapusher_jobs table just fine.

Slhoka commented

Same here for me with the Dockerised version.
I try to only use variable from my docker-compose.yml however the values from WRITE_ENGINE_URL and SQLALCHEMY_DATABASE_URI (for exemple) comes from the .env that I need to package inside the image and which is located in /etc/ckan/datapusher