> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ollie.shop/llms.txt
> Use this file to discover all available pages before exploring further.

# deploy and status

> Bundle a component or function folder, send it to the builder, follow the build, and control what goes into the bundle with .ollieignore

`deploy` zips your project, uploads it to the Ollie builder for one component or function, and optionally waits for the build. It needs a login and the id of the record you deploy to; it does not read `ollie.json`.

```bash theme={"system"}
ollieshop deploy --component-id <uuid> --name FreeShippingBar --wait
ollieshop deploy --function-id <uuid> --name fraud-check --wait --timeout 600
```

| Flag | Meaning |
| - | - |
| `--component-id <uuid>` or `--function-id <uuid>` | The record to deploy to. Exactly one of the two |
| `--name <folder>`, `-n` | The folder name under `components/` or `functions/` |
| `--wait` | Poll the build until it finishes. Without it the command returns as soon as the upload is accepted |
| `--timeout <seconds>` | How long `--wait` polls. Default 300 |
| `--dry-run` | Build the zip locally and report its size and what was excluded, without uploading |

```
project folder ──zip──▶ builder ──build──▶ CDN ──▶ served in the slot
       │                   │
 .ollieignore          status / logs
```

## Output

Without `--wait`:

```json theme={"system"}
{"success":true,"data":{"id":"5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9","status":"RUNNING","startTime":"…","resource":{"id":"a1b2c3d4-…","type":"component"}}}
```

With `--wait`, the same object once the build reaches a final state. In a terminal you also see the polling:

```text theme={"system"}
Build 5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9 started. Polling...
  status: RUNNING
  status: SUCCEEDED
```

A build that ends in `FAILED`, `STOPPED`, `TIMED_OUT` or `FAULT` exits with code 1. So does `Build <id> timed out after 300s`; the build itself keeps running, check it with `status`.

A `--dry-run` reports `bundleSizeBytes`, `bundleSizeKB`, the `.ollieignore` file used, how many files were excluded and the first 50 of them.

## status

```bash theme={"system"}
ollieshop status --build-id <id> [--wait] [--timeout <seconds>]
```

Returns the build (`id`, `status`, `startTime`, `endTime`, `resource`) and, with `--wait`, polls it with the same rules as `deploy`. The build id is in the `deploy` output and in the component's **Builds** tab in the Admin, where the log also lives (see [Managing Components](/ollie-shop/customization/managing-components.md#builds)).

## What goes into the bundle

The zip is built from the **whole project root**, not only from the deployed folder, so a component can import shared code from anywhere in the project:

* **Always excluded**: `node_modules`, `.git`, `.next`, `dist`, `build`, and `*.d.ts`, `*.tsbuildinfo`, `*.js.map` files. Symlinks are skipped.
* **Root files** are included only with source or asset extensions (`.ts`, `.tsx`, `.js`, `.jsx`, `.json`, `.css`, `.scss`, `.less`, `.svg`, `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.ico`, fonts). Dotfiles in the root are included unless listed in `.ollieignore`.
* A generated entry point is added: `index.tsx` re-exporting the default export of `components/<name>` for a component, or `index.ts` re-exporting the named `handler` of `functions/<name>` for a function. If your project has its own root `index.tsx`, it is dropped with a warning.
* `package.json` is required and always included.

> [!WARNING]
>
> Add `.env` and `.env.*` to `.ollieignore` before your first deploy. The scaffolded project ships a `.ollieignore` with those lines ready to enable.

### .ollieignore

A gitignore-style file in the project root. Patterns are matched against paths inside the zip. The scaffold ships one with `.cache`, `.turbo`, `coverage`, `.agents`, `.claude`, `.vscode`, `.mcp.json` and `.gitignore`.

```text .ollieignore theme={"system"}
.env
.env.*
docs/
*.test.tsx
```

Two rules: a pattern cannot re-include anything from the always-excluded list, and `package.json`, `index.ts` and `index.tsx` are kept even when a pattern matches them (the CLI warns).

### Size limit

The builder rejects uploads over **10 MB**. `deploy --dry-run` shows the size before you upload; the usual fix is to ignore folders the component does not need.

## Related

* [Managing Components](/ollie-shop/customization/managing-components.md): builds and roll back in the Admin
* [Roll Back a Component](/ollie-shop/customization/roll-back-a-component.md): point the slot back at an earlier build
* [Functions](/ollie-shop/functions.md): what a deployable function looks like


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.