How to add environment variables to docker compose interpreter?

Answered

Hi, I'm trying to add the environment variables that I usually add to docker compose with the --env-file flag to the docker compose python interpreter, but it just not works:

Here is what I'm doing: https://share.cleanshot.com/zyCSBrBP

0
2 comments

It seems to be the same issue as https://youtrack.jetbrains.com/issue/PY-51757/docker-compose-based-interpreter-queries-for-available-services-before-applying-environment-variables where PyCharm doesn't set the environment variables before starting the container.
Perhaps setting the environment variables in the docker-compose.yml file may work as a workaround, but I'm not 100% sure.

0

That workaround can be dangerous as the docker compose file receives information such as database credentials. 

0

Please sign in to leave a comment.