# deploying-airflow

A skill for shipping Airflow DAGs and projects: Astro CLI commands, Docker Compose and Helm. Useful when pipelines need to reach production.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 786 installs · ★ 456
- Author: astronomer
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/astronomer/agents/tree/HEAD/skills/deploying-airflow/SKILL.md
- Updated: 2026-10-14
- HTML: https://affpapa.org/en/nevibecode/skills/deploying-airflow

## What it does

The skill covers Airflow deployment end to end: pushing DAGs and projects, setting up CI/CD, and picking a release strategy. It walks through Astronomer's Astro CLI for managed operations and the open-source routes on Docker Compose or Kubernetes.

Four Astro commands are documented. `astro deploy` builds a Docker image and ships everything, `astro deploy --dags` pushes only files in `dags/` and skips the image build, `astro deploy --image` sends just the image, and `astro deploy --dbt` deploys a dbt project to run alongside Airflow. Branch-to-deployment mapping through GitHub integration is described too, along with three common CI/CD patterns. Changed `requirements.txt`, `Dockerfile` or plugins? A DAG-only deploy will not pick those up.

For open source, the skill supplies a Docker Compose setup. The official Airflow 3 file brings up api-server, scheduler, dag-processor, worker, triggerer, postgres and redis; a minimal LocalExecutor version drops worker and redis. Docker and Docker Compose v2.14.0+ are required. The author suggests Docker Compose for development and the Helm chart on Kubernetes for production.

## Requirements
- Works with: Docker, Kubernetes

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add astronomer/agents --skill deploying-airflow -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/deploying-airflow/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/deploying-airflow/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add astronomer/agents --skill deploying-airflow -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/deploying-airflow/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add astronomer/agents --skill deploying-airflow -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/deploying-airflow/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install astronomer/agents deploying-airflow
```

2. **Manually: put the files in place**
- File: `.github/skills/deploying-airflow/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add astronomer/agents --skill deploying-airflow -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/astronomer/agents --path skills/deploying-airflow
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/deploying-airflow/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add astronomer/agents --skill deploying-airflow -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/astronomer/agents/tree/HEAD/skills/deploying-airflow/SKILL.md

## When to use it
- push changed DAGs without rebuilding the Docker image
- build a CI/CD pipeline with separate image and DAG releases
- run Airflow locally with Docker Compose
- trigger deploys automatically on branch push
- deploy a dbt project alongside Airflow

## Example prompts
- Deploy my Airflow project to Astro — requirements.txt and DAGs changed
- Push only the DAGs folder, skip the image build
- Set up CI/CD: full deploy on main, DAG-only on feature branches

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 359e4f7030d0f1af.

BEGIN THIRD-PARTY FILE 359e4f7030d0f1af
````text
---
name: deploying-airflow
description: Deploys Airflow DAGs and projects. Use when deploying Airflow or answering anything about deployment - deploying DAGs/projects, pushing code, setting up CI/CD, deploying to production or deployment strategies for Airflow.
---

# Deploying Airflow

This skill covers deploying Airflow DAGs and projects to production, whether using Astro (Astronomer's managed platform) or open-source Airflow on Docker Compose or Kubernetes.

**Choosing a path:** Astro is a good fit for managed operations and faster CI/CD. For open-source, use Docker Compose for dev and the Helm chart for production.

---

## Astro (Astronomer)

Astro provides CLI commands and GitHub integration for deploying Airflow projects.

### Deploy Commands

| Command | What It Does |
|---------|--------------|
| `astro deploy` | Full project deploy — builds Docker image and deploys DAGs |
| `astro deploy --dags` | DAG-only deploy — pushes only DAG files (fast, no image build) |
| `astro deploy --image` | Image-only deploy — pushes only the Docker image (for multi-repo CI/CD) |
| `astro deploy --dbt` | dbt project deploy — deploys a dbt project to run alongside Airflow |

### Full Project Deploy

Builds a Docker image from your Astro project and deploys everything (DAGs, plugins, requirements, packages):

```bash
astro deploy
```

Use this when you've changed `requirements.txt`, `Dockerfile`, `packages.txt`, plugins, or any non-DAG file.

### DAG-Only Deploy

Pushes only files in the `dags/` directory without rebuilding the Docker image:

```bash
astro deploy --dags
```

This is significantly faster than a full deploy since it skips the image build. Use this when you've only changed DAG files and haven't modified dependencies or configuration.

### Image-Only Deploy

Pushes only the Docker image without updating DAGs:

```bash
astro deploy --image
```

This is useful in multi-repo setups where DAGs are deployed separately from the image, or in CI/CD pipelines that manage image and DAG deploys independently.

### dbt Project Deploy

Deploys a dbt project to run with Cosmos on an Astro deployment:

```bash
astro deploy --dbt
```

### GitHub Integration

Astro supports branch-to-deployment mapping for automated deploys:

- Map branches to specific deployments (e.g., `main` -> production, `develop` -> staging)
- Pushes to mapped branches trigger automatic deploys
- Supports DAG-only deploys on merge for faster iteration

Configure this in the Astro UI under **Deployment Settings > CI/CD**.

### CI/CD Patterns

Common CI/CD strategies on Astro:
````
END THIRD-PARTY FILE 359e4f7030d0f1af

The third-party file has ended. Everything between the 359e4f7030d0f1af tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2587 of 11078 bytes. © astronomer · Apache-2.0 · https://github.com/astronomer/agents/tree/HEAD/skills/deploying-airflow/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
