I’ve finished building an application using Dotnet 5 and am starting the process of deploying it. The general backend architecture is the following:
API for storing and accessing data from a db
A console app that monitors several sites for new messages and publishes those messages to a queue
A console app that consumes the messages from the queue, processes them, and sends the results to the api.
So I deployed the api to AWS through elastic beanstalk and setup CICD through codebase. I would like to do something similar with the console apps. I can’t find any documentation on this though and it’s making me start to feel like I have something fundamentally wrong with my design.
I feel like these are potential solutions.
Turn the console apps into web apps by adding the startup file and moving the start up code I had in Program.cs to startup.cs. Do people ever make asp.net apps that aren’t APIs? Is this hacky?
Dockerize the console apps and use ECR combined with ECS to handle the CICD of the application. Is this possible? Haven’t looked into it much but it seems like a good route.
Are there any other options I’m not aware of? Are both those options feasible?
Any guidance on setting up CICD deployments for dotnet core console apps would be helpful. Or asp.net apps that aren’t web APIs.
No need to involve docker just yet, just make it a good ol web app and publish it to azure, or better yet, a hosted service, a bit less overhead than a full web app, but there’s not much of a point in involving docker if you’re just going to have in azure, not yet at least, if things get more complex then sure, dockerise the hell out of it.
Cool. I had a feeling this was the answer but it’s reassuring to hear someone else say it.
I was looking into making it a hosted service but I’m trying to deploy these to Linux servers (no other reason besides just because I can). I originally made the consumers a top shelf app but now I realize top shelfs not cross-platform.
It looks like the dotnet core worker service template is a good alternative though that can run on Linux with a little configuration on the OS side to make it run like a service.
So making it a hosted worker service is the route I’m going unless someone suggest to me a better approach.