Question about using `DockerRunLauncher` with mult...
# ask-community
m
Question about using
DockerRunLauncher
with multiple code locations via docker compose. Do I need to provide environment variables needed for all code location images in the one place or is there a way to provide per code location environment variables? I think the only place I can provide environment variables to the containers for running jobs is in
dagster.yaml
right? i.e.
Copy code
run_launcher:
  module: dagster_docker
  class: DockerRunLauncher
  config:
    env_vars: <- provided to all run containers
      - DAGSTER_POSTGRES_USER
      - DAGSTER_POSTGRES_PASSWORD
      - DAGSTER_POSTGRES_DB
    network: dagster_network
    container_kwargs:
      volumes: # Make docker client accessible to any launched containers as well
        - /var/run/docker.sock:/var/run/docker.sock
        - /tmp/io_manager_storage:/tmp/io_manager_storage
Anyone dealt with this before? I feel like passing an env file to each code location from my docker compose file in addition to combining and setting them for the dagster daemon and then manually passing in ALL environment variable keys into the config for the run launcher feels like a bad pattern. I found this which I am trying to implement so it might get me what I need