squid.yaml by convention. The manifest defines how the squid should be built, customized and scaled during the deployment to SQD Cloud. It is used together with sqd deploy to deploy or update an existing squid version.
With the introduction of the deployment manifest the add-ons (postgres) and the API services (api) become optional. This allows flexible deployment configuration for analytic use-cases (e.g. transform and write to s3 or BigQuery).
Header
The manifest header defines the squid metadatabuild:
Specifies the way the squid is built into a docker image.
For a successful build the following files and folders must be present in the root folder of the squid:
/srctsconfig.jsonpackage.jsoncommands.json
db and assets folders are added to the build context if present in the squid folder. See Project structure for more info.
Under the hood, Cloud builds a Docker image and runs a docker container for each service (api, processor, migrate) using the same image.
See 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.
cmd:
Enables overriding the dependencies installation command, e.g.
npm ci).
deploy:
The deploy section may define:
addons:
A list of add-on services to be deployed along the squid services.
postgres:
rpc
migrate:
Optional The init container ran before processor and api services are started. If it exits with an error, squid deployment fails.
processor:
A processor service or a list of processor services of the squid.
With a single processor this section may look like this:
process:prod:bsc and process:prod:eth are extra sqd commands defined at commands.json:
commands.json
api:
Optional The GraphQL API service of the squid. Automatically provisions a publicly available endpoint https: "//\{org\}.subsquid.io/\{name\}/v/v\{version\}/graphql and binds it to the server.”
env:
Optional A key-value list of deployment-wide (i.e. visible to all services of the squid) env variables to be set
scale:
See the Scale the deployment section.
Examples
A minimal example of manifest is below:squid.yaml
squid.yaml