> For the complete documentation index, see [llms.txt](https://docs.usegallery.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usegallery.com/build-system/project-builds.md).

# Project Builds

The Gallery build system has 3 major steps. First, gallery runs any pre-infrastructure build instructions indicated in deployment repositories. Then, Gallery spins up any infrastructure (including any terraform repositories/snippets), and finally, Gallery runs post infrastructure jobs from deployment repositories. To indicate the docker image used to build your deployment repositories, you can specify an `image` field in your `.gallery-deploy.yml`

```
image: gallery/example
```

### 1. Pre-Infrastructure Build Instructions

The pre-infrastructure build stages can be indicated in your [.gallery-deploy.yml](/build-system/project-builds/.gallery-deploy.yml-docs.md) file under the `init_stages` section of the deploy file (for more information, see [stages](/build-system/project-builds/build-stages.md).

### 2. Service Builds

After the pre-infrastructure steps are completed, Gallery starts any infrastructure that is specified under your template. If you use [terraform](/build-system/terraform.md), we add a `.tfvars` file to your terraform repository to allow you to use Gallery-specific variables in your terraform configurations.&#x20;

### 3. Post-Infrastructure Build Instructions

The post-infrastructure steps are used to deploy code to your newly created infrastructure. Take a look at the [build jobs](/build-system/project-builds/build-jobs.md) section for more information on the available environment variables.
