https://dagster.io/ logo
b

Basil V

02/12/2021, 1:14 AM
Hello, is there a way to reference an entire
.env
file for the DockerRunLauncher config rather than listing out each env variable? Currently it is:
Copy code
config:
    env_vars:
      - DAGSTER_PG_USERNAME
      - DAGSTER_PG_PASSWORD
      - DAGSTER_PG_DB
      - DAGSTER_PG_HOST
Ideally something like:
Copy code
config:
    env_file: .env
👀 1
d

daniel

02/12/2021, 4:02 AM
Hi Basil - we don't currently have that as an option, it doesn't sound hard to add though. I don't see an env_file option built-in in https://docker-py.readthedocs.io/en/stable/containers.html which is the API the run launcher uses (although I see the docker CLI has it) - so the launcher would need to do its own parsing of the file to construct the key-value pairs to send into the docker API.
b

Basil V

02/12/2021, 8:54 PM
Hey @daniel thanks for the reply! Sounds great, I'll see if I can maybe put up a PR for the change when I have some spare time!
celebrate 1