🚢Deployment

When you are ready to deploy Harmony to a different environment (e.g. staging or production), you need to setup the deployments for the following dependencies & apps:

Dependencies to be installed

The dependencies can be installed either on premise infrastructure or use cloud/managed providers. In either case, you will need to configure their connection strings in all corresponding settings files (basically appsettings.<environment>.json). There isn't better documentation for installing them than their official pages.

Applications to deploy

All the above applications have been built with .NET 8.0 so you can follow Microsoft's documentation for thorough details on hosting and deployment.

Attention for Harmony.Client

The front end of Harmony is a Standalone Blazor wasm web app which means it doesn't have any dependency on .NET Core hosting. That's why you may have noticed that nginx is used to serve the app in the docker containers.

You are free to use any host of your preference such as nginx or IIS to host Harmony.Client, but always treat it as a static website.

Configurations - things to consider

  • ApiGateway: The first thing you need to configure is the ocelot.json DownstreamHostAndPorts property to match your environment URLs. All you have to do is change localhost & port property to the ones that reflects your custom environment. Things are easier if you use docker, since the ocelot.docker.json file is used instead, which uses the services names rather than fixed URLs. In any case, if you use docker for your new environment, you may have to configure that file accordingly. Of course before configuring these settings you must have already configured & deploy Harmony.Api, Harmony.Automations & Harmony.Signalr applications.

  • Services: For all web apps existing in the Services solution folder, configure all the properties in the appsettings.<environment>.json file. Each app may have different dependencies, e.g. RabbitMq, MongoDb or SQL Server. Fill the correct connection strings for all of them to match your environment.

  • Harmony.Client: The only property you need to configure is the gatewayUrl property existing in the www/appsettings.<environment>.json file. This is the hosting URL for the Harmony.ApiGateway application which should be publicly accessible.

All these settings are already configured for local development & debugging either directly from code or using docker containers so feel free to fully understand them before proceeding to installing Harmony to a new environment.

Following next: Debugging and running Harmony locally

🏃‍♂️Before running🌐Workspaces

Last updated