Skip to content

Blocks

Blocks are abstractions that encapsulate an app or a stack to be deployed, they come in two flavors:

  • App Blocks: These are your applications, APIs, or microservices, the code you wrote, or docker images. They’re the main players!
  • Service Blocks: These support your apps, like databases or caches, quietly working behind the scenes to keep everything running smoothly.

You can manage, scale, and monitor each block separately, giving you flexibility and control.

You can create blocks by clicking or dragging from the left toolbar.

You can click on the block to open it.

The block is not yet configured, it needs a docker image. Let’s add the public nginx image.

We now have a properly configured nginx service, you can rename the block to make it clearer.

Let’s start with the General configuration while we’re here:

  • Platform: what your block runs on, read only once defined.

  • Code source: how your code gets to us, here only docker is available but you can also find GitLab & GitHub for other applications.

  • Default domain: the default domain where your block will be deployed, read-only.

  • Custom domains: in addition to the default domain you can add your domains. You need to have access to the DNS zone of the domain to configure it.

Let’s switch to the Recurring tab:

  • Recurring commands: commands that will be run on a set interval in your image.

The Environment variables tab now:

Environment variables are a way to set the configuration for your application at runtime.

You will have “Block variables” which are the variables directly for this block and each connected block, a section for variables that are “exposed” on the distant block that will be injected in this block.

Block variables have the following configuration options :

  • Name: the name of the variable, as injected in the block. Case sensitive.

  • Value: the value of the variable that will be injected.

  • Exposed: if this is true, the variable will be injected in all connected blocks.

  • Protected: if this is true, the value will never be shown again. This is used to protect sensitive information from leaking even if your account was compromised. If the variable is protected and is unprotected, the value will be truncated.

For injected variables :

  • Original name: the name of the variable in the original block.

  • New name: the name of the variable that will be injected. Note that the value will be unchanged.

And last, Deployment commands:

Those commands are executed at specific moments during deployments, in the order you defined.

Common uses are to run database migrations or to clear cache, for example.

Once deployed, you will have 2 more tabs:

Logs:

You can see, and search, the logs for all the containers of the block.

Metrics:

You can see the metrics for the block, like CPU and memory.