Aric Huang
07/01/2025, 6:18 PMprefect deployment build
CLI command in Prefect 2, which also seem to be removed in 3. Is there an equivalent in 3?Marvin
07/01/2025, 6:18 PMMarvin
07/01/2025, 6:19 PMprefect deployment build
, you now use prefect deploy
2. The new system revolves around a prefect.yaml
configuration file that defines your deployment settings
Here's a quick example of how it works:
yaml
# prefect.yaml
deployments:
- name: my-deployment
entrypoint: flow.py:my_flow # path to your flow function
schedule: null # or define a schedule
work_pool:
name: my-work-pool
Then simply run:
bash
prefect deploy
This new approach is more powerful and flexible than the old build
command because:
- It provides a clear, version-controlled configuration
- It handles both building and pushing in one step
- It supports more advanced configuration options through the YAML file
You can find complete details in the documentation:
- Prefect YAML Guide
- Deployments Concept Guide
Would you like me to explain any specific aspect of the new deployment system in more detail?