Hi everyone, I deployed multiple flows locally usi...
# ask-community
a
Hi everyone, I deployed multiple flows locally using:
Copy code
Deployment.build_from_flow
and I want to deploy it with environment variables from my .env file. Is there a way to do it while creating the work pool? Or the only way to do it is with the
job_variables
argument? what is the best practice of this case? This is how I create the work pool:
Copy code
prefect work-pool create localhost-tests --type process
this is my current deployment script:
Copy code
deployment = Deployment.build_from_flow(
    flow=flow,
    name=f"{flow.name}",
    work_pool_name="localhost-tests",
    job_variables={
        "env": dict(env.to_dict())
    },
)
deployment.apply()