Skip to content

Using worker service template in order to create long-running cross-platform services

Notifications You must be signed in to change notification settings

aimenux/WorkerServiceDemo

Repository files navigation

.NET

WorkerServiceDemo

Using worker service template in order to create long-running cross-platform services

In this repo, i m building a long running background service based on worker service template.

Worker services are a great way to create cross-plateform services that can be deployed on :

📌 windows

📌 linux

📌 docker

📌 azure container instance

In this repo, the worker displays features from configuration file based on 3 strategies :

1️⃣ ConfigurationOptionsService : static reading of configuration features

2️⃣ ConfigurationOptionsSnapshotService : dynamic reading of configuration features

3️⃣ ConfigurationOptionsMonitorService : dynamic reading of configuration features

In order to deploy the worker as a windows service, type the following commands in your terminal :

✅ Build in release mode : dotnet build -c release

✅ Publish to some folder : dotnet publish -o [PATH-TO-FOLDER]

✅ Create windows service : sc create [SERVICE-NAME] binPath=[PATH-TO-FOLDER]\[App.exe]

✅ Delete windows service : sc delete [SERVICE-NAME]

Tools : net 8.0

About

Using worker service template in order to create long-running cross-platform services

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages