https://github.com/aimenux/workerservicedemo
Using worker service template in order to create long-running cross-platform services
https://github.com/aimenux/workerservicedemo
net80 windows-service worker-service
Last synced: about 2 months ago
JSON representation
Using worker service template in order to create long-running cross-platform services
- Host: GitHub
- URL: https://github.com/aimenux/workerservicedemo
- Owner: aimenux
- Created: 2021-02-17T23:28:52.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-06T11:55:41.000Z (over 1 year ago)
- Last Synced: 2025-02-27T01:54:30.075Z (11 months ago)
- Topics: net80, windows-service, worker-service
- Language: C#
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/aimenux/WorkerServiceDemo/actions/workflows/ci.yml)
# 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](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-5.0&tabs=visual-studio#worker-service-template).
>
> Worker services are a great way to create cross-plateform services that can be deployed on :
>
>> :pushpin: windows
>>
>> :pushpin: linux
>>
>> :pushpin: docker
>>
>> :pushpin: [azure container instance](https://devblogs.microsoft.com/aspnet/dotnet-core-workers-in-azure-container-instances/)
>
> In this repo, the worker displays features from configuration file based on 3 strategies :
>
> :one: `ConfigurationOptionsService` : static reading of configuration features
>
> :two: `ConfigurationOptionsSnapshotService` : dynamic reading of configuration features
>
> :three: `ConfigurationOptionsMonitorService` : dynamic reading of configuration features
>
> In order to deploy the worker as a windows service, type the following commands in your terminal :
>
>> :white_check_mark: Build in release mode : `dotnet build -c release`
>>
>> :white_check_mark: Publish to some folder : `dotnet publish -o [PATH-TO-FOLDER]`
>>
>> :white_check_mark: Create windows service : `sc create [SERVICE-NAME] binPath=[PATH-TO-FOLDER]\[App.exe]`
>>
>> :white_check_mark: Delete windows service : `sc delete [SERVICE-NAME]`
>
**`Tools`** : net 8.0