How to run formulas

In this section, you will find a path to how run formulas using Ritchie.

How to run?

There are two ways to run formulas on Ritchie :

  1. Locally

  2. Using Docker

The default formulas execution method has been defined during the initialization step with therit initcommand. It can be changed executing the following command:

rit set formula-runner
rit set formula-runner command

1. Locally

To run a formula locally it is necessary to have the formula programming languages dependencies installed on the computer.

Example: a formula written in Node will need Node installed on the computer, so it will be able to run locally.

2. Through Docker

All formulas can run regardless the programming language used from the moment you have DOCKER installed and running.

Check out on the following example how to run a "Hello World" formula

3. Local & Docker Flags

You can force Ritchie CLI to execute a formula with a specific method using flags.

  • The --local flag will execute a formula with locally (if the default method is Docker).

  • The --docker flag will execute a formula with Docker (if the default method is local).

4. Containers with Ritchie

All formulas templates contain a DockerFile which creates a container with Ritchie CLI installed.

Next steps

On this section, you saw how to run a formula on Ritchie. To keep learning:

👉 Go to Hello World formula to see different ways to run a formula on Ritchie.

👉 Go to the create formulas section to understand how to create your first automation with Ritchie.