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
This will configure all hosts and modules in the cluster.
❯ nomirun cluster configure --cluster-name "MyApp" --nuget-server-name "Feedz.io"
Then, we need to generate the .env file to run it in the container.
❯ nomirun cluster generate --cluster-name "MyApp" --target-format DockerEnvFile
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.
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
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"