Skip to main content

Getting started with Blocks

Log in to add to favourites

Page last updated 23 January 2026

This guide introduces Contensis Blocks and shows how to deploy a basic Block using a container image.

If you follow a continuous integration/continous delivery approach, you should refer to our more advanced article on deploying Blocks automatically using CI/CD.

Blocks allow you to run containerised applications within Contensis. They are commonly used to render websites, handle application routing, or provide supporting services for a Contensis solution.

Prerequisites

Before you begin, you'll need:

  • A Contensis project
  • The Contensis CLI installed
  • A container image available in a container registry (public or private)
  • A user account with System Administrator or Block CI permissions

Step 1: Build a container image

Your application must be packaged as a Docker image. The image must expose a web server on a single port (default is 3001).

Example:

Shell
docker build -t my-registry/my-app:latest .

Push the image to your container registry:

Shell
docker push my-registry/my-app:latest

Step 2: Push the Block to Contensis

Use the Contensis CLI to push the Block:

Shell
push block my-block my-registry/my-app:latest main \
  -cid <commit-sha> \
  -cmsg "Initial block push" \
  -cdt "YYYY-MM-DDTHH:MM:SSZ" \
  -author "you@example.com" \
  -committer "you@example.com" \
  -repo "https://example.com/your-repo.git" \
  -pr git

Once pushed, the Block appears in the Blocks section of your Contensis project.


Step 3: Preview and use the Block

After pushing the Block:

  • Preview the Block in your project.
  • Assign the Block to a renderer, which you can then apply to a Site View node to use the Block to render a specific section of your site, or to a content type to use the Block when rendering content created from that content type.
  • Make the Block live when ready.

At this point, your Block is running inside Contensis.


Next steps

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request