Documentation

Start the Nomirun module with a containerized Nomirun Host

1. Create a cluster and build the module

First, we need to create a Nomirun cluster and build the module. Make sure your remote –nuget-server-name is defined.

Then add a host MyShopApi to the cluster which will run the MyModule module.

 nomirun cluster new --cluster-name "MyApp"
 nomirun module build --module-name "CrmService" --module-version 1.0.1 --nuget-server-name "Feedz.io"
 nomirun cluster add-host --cluster-name "MyApp" --host-name "CrmHost" --modules "CrmService@1.0.1" --host-framework net10.0 --host-platform win-x64
        

2. Configure all hosts in the Nomirun cluster

This will configure all hosts and modules in the cluster.

 nomirun cluster configure --cluster-name "MyApp" --nuget-server-name "Feedz.io"
        

3. Generate .env configuration file to inject into the container

Then, we need to generate the .env file to run it in the container.

 nomirun cluster generate --cluster-name "MyApp" --target-format DockerEnvFile
        

4. Start Nomirun cluster

Please note that you cannot start a module without building it first.

Once you have configured the cluster, you can start the cluster:

 nomirun cluster start --cluster-name "MyShop" --host-type Container
        

This will run module CrmService 1.0.0 with containerized Nomirun Host on your PC.

Docker desktop / Podman desktop needs to be installed to do this.

5. Stop Nomirun cluster

To stop the Nomirun cluster from the CLI, use the command below. You can also manually stop the running Nomirun Host container.

 nomirun cluster stop --cluster-name "MyShop" --host-framework 9.0 --host-type Container
        

6. Clean Nomirun cluster host files

Sometimes, you need to force rebuild the cluster’s hosts binaries. To clean the Nomirun cluster host files, use the command below.

 nomirun cluster clean --cluster-name "MyShop"