Deploying code is the process of pushing code to an Astro Private Cloud (APC) Deployment. A code deploy can include an entire Astro project as a Docker image, or just the Dags in your project. APC supports several methods for deploying code to a Deployment:
Use this document to understand each method and choose the right approach for your use case.
By default, deploy code by building it into a Docker image and pushing to the Astronomer Registry using the CLI.
This mechanism builds your Dags into a Docker image alongside all other files in your Astro project directory:
requirements.txt)packages.txt)The resulting image generates Docker containers for each Airflow component. Every time you run astro deploy, your project is rebuilt into a new image and containers are restarted.
For faster iteration, enable Dag-only deploys to deploy just your dags directory without rebuilding the Docker image.
You still need Docker access to authenticate to APC before deploying Dags.
For teams deploying Dag changes frequently, APC supports NFS volume-based Dag deploys.
Using this mechanism, deploy Dags by adding Python files to a shared filesystem on your network. Compared to image-based deploys, NFS enables:
For configuration details, see Deploy Dags via NFS volume.
For Git-based workflows, APC supports git-sync deployments.
Configure a Git repository to sync with your Deployment. When you push changes to the repository, Dags automatically sync with no downtime.
For configuration details, see Deploy Dags via git sync.
You can combine deployment methods:
NFS and Git Sync are mutually exclusive with CLI deploys for the same Deployment. Once configured, a Deployment uses only that mechanism.
All deployment methods integrate with CI/CD pipelines: