Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/cloud/reference/manifest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Specifies the way the squid is built into a docker image.
|:-----------------:|:-----------------------------:|----------------------:|
| `node_version` | `18 \| 20 \| 21` | `20` |
| `package_manager` | `auto \| npm \| pnpm \| yarn` | `auto` |
| [`install`](#install) | list | |

For a successful build the following files and folders **must** be present in the root folder of the squid:

Expand All @@ -52,6 +53,17 @@ Under the hood, Cloud builds a Docker image and runs a docker container for each
See [Self-hosting](/sdk/resources/basics/self-hosting) for instructions on how to build and run the Docker image locally.
Even though the squid services (`api`, `processor`, `migrate`) use the same single container image, the exec command is different and can is defined by the `deploy:` section as explained below.

### `install:`

Enables overriding the dependencies installation command, e.g.
```yaml
build:
install:
- npm
- install
```
The default is to use a shrinkwrap-based installation command appropriate for the detected package manager (e.g. `npm ci`).

## `deploy:`

The `deploy` section may define:
Expand Down
19 changes: 19 additions & 0 deletions docs/cloud/resources/monorepo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
sidebar_position: 65
title: Working with monorepos
description: Custom build command + external lock files
---

# Working with monorepos

When a squid is a part of some large project it is often convenient to keep it in a monorepo. These setups typically keep [shrinkwrap](https://nodejs.org/en/blog/npm/managing-node-js-dependencies-with-shrinkwrap) files such as `package-lock.json` in some centralized location.

By default, [`sqd deploy`](/squid-cli/deploy) relies on shrinkwrap-based installation commands such as `npm ci`. These expect to find a shrinkwrap file in the root folder of the squid, so not having it there may complicate the deployment.

Circumvent the issue by overriding the dependency installation command in your squid's [manifest](/cloud/reference/manifest/#install). The quick-and-dirty solution is to just ask for a fresh install, e.g.:
```yaml
build:
install:
- pnpm
- install
```