Documentation

Start multiple Nomirun module with containerized Nomirun Host

1. Add host with 2 modules to cluster MyShopMonolith

 nomirun cluster add-host --cluster-name "MyShopMonolith" --host-name "HostApi" --modules "CrmService@1.0.0;AccountService@1.0.2" --host-framework net10.0 --host-platform win-x64

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

2. Configure cluster MyShopMonolith

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

3. Generate .env file for containers for cluster MyShopMonolith

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

4. Start Nomirun cluster with host HostApi

Once you have a built and configured host, you can now run it and load the module in the standalone Nomirun Host.

Use --host-type Container to run it in container. Docker desktop / Podman desktop needs to be installed to do this.

Use Nomirun CLI for that:

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

This will run module CrmService 1.0.0 and AccountService 1.0.2 on the same host as modular monolith on your computer.

5. Stop Nomirun module

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 "MyShopMonolith"
 nomirun cluster stop --cluster-name "MyShopMonolith" --host-type Container