News for hackers. Stuff that matters.
Re:Ask HN: What would be your stack if you are building an M... by pc86 on Thursday January 26, 2023 @11:39AM (#34534057)
Have you found any good managed places to deploy modern .NET apps other than Azure? My experience is you can either use Azure, in which it's fairly abstracted for you but overpriced, or you can use something like DO where it's more reasonably priced but you have to handle everything yourself.
Re:Ask HN: What would be your stack if you are building an M... by bob1029 on Thursday January 26, 2023 @11:42AM (#34534122)
I think we need to be super precise when we use the word "managed". Today, we use EC2/Azure VMs to run a lot of .NET 6+ apps. I consider these to be managed resources. My involvement with those servers is an email from the hypervisor ~once a year politely requesting a reboot.

I don't think .NET has any specific implications regarding where the product is hosted. If you are referring to the Microsoft insight/Azure integration crap, we use 0% of that.

Re:Ask HN: What would be your stack if you are building an M... by pc86 on Thursday January 26, 2023 @12:12PM (#34534716)
That's basically what I mean. I just want to deploy the app and not have to worry about anything OS-related, including IIS config, SSL, etc.
Re:Ask HN: What would be your stack if you are building an M... by bob1029 on Thursday January 26, 2023 @12:26PM (#34534997)
That's exactly what I do - I build a monolith using the self-contained deployment feature and zip it up to the server to run.

The management of certificates, configuration, etc. is built directly into any product I work on. Outsourcing this stuff to IIS, et. al. is exactly how you wind up hating all of this tech in the first place.

Prerequisites are zero if you do this right. I can take a blank EC2 server, copy the binaries over and run them immediately. I don't even have to install any runtimes or SDKs.

Re:Ask HN: What would be your stack if you are building an M... by kbrannigan on Thursday January 26, 2023 @12:35PM (#34535184)
How do you setup your webserver. This is the most challenging part for me.

Here's my process. Build locally, publish, upload to server, dotnet run... Now what?

Re:Ask HN: What would be your stack if you are building an M... by bob1029 on Thursday January 26, 2023 @12:56PM (#34535624)
Modern .NET contains the web server. It's not an external thing anymore. You include a .NET library to host your stuff. Check out the minimal api reference:

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/s...

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/m...

Literally everything runs inside your process now, including the database if you go for SQLite.

Re:Ask HN: What would be your stack if you are building an M... by seattle444 on Thursday January 26, 2023 @01:34PM (#34536394)
C# is heavily influenced by golang now. Run with 0 dependencies. Web server bundled.
Re:Ask HN: What would be your stack if you are building an M... by soulbadguy on Friday January 27, 2023 @04:01AM (#34544075)
> C# is heavily influenced by golang now

Source ?

Re:Ask HN: What would be your stack if you are building an M... by barbazoo on Thursday January 26, 2023 @12:13PM (#34534730)
Looks like you can run containerized .NET apps via GCP Cloud Run

https://cloud.google.com/run/docs/fit-for-run

Re:Ask HN: What would be your stack if you are building an M... by SIRHAMY on Friday January 27, 2023 @11:32AM (#34547926)
This is what I do.

* CloudRun - .NET in Docker * CloudSQL - Managed Postgres

Re:Ask HN: What would be your stack if you are building an M... by kcartlidge on Thursday January 26, 2023 @01:26PM (#34536222)
Just for clarity for others passing through this thread ...

Current .NET produces stand-alone cross-platform executables just like many other stacks.

Unless you're forced to do legacy stuff, there is no Framework any more, and no Windows or IIS needed. They build and deploy exactly like other ecosystem executables because that's exactly what they are. You can even generate a Linux server build from Windows and MacOS. And it also works fine with standard container stuff.

By default a .NET web app or API is a stand-alone server, with optional https built in, and you can either sit it behind a proxy like nginx or you can direct traffic straight at it. In summary, forget all the old stuff about frameworks, Windows, and IIS. If you're doing your own project and not working legacy stuff you don't need any of it.

Re:Ask HN: What would be your stack if you are building an M... by mdasen on Thursday January 26, 2023 @02:59PM (#34537869)
Fly.io works great. .NET will generate the Dockerfile for you already so it's pretty easy to set it up. Fly.io will even give you a hosted PostgreSQL.

DigitalOcean's App Platform should also handle .NET apps as easily as anything else.

.NET makes it easy to get your app all set for Docker and there's a lot of platforms that will take Docker containers or even build them from your repository.

I guess I'm wondering what managed services for other languages feel more managed/easy than Fly.io or DO's App Platform taking your repository, building it, and launching it.

Re:Ask HN: What would be your stack if you are building an M... by JoeMayoBot on Thursday January 26, 2023 @04:55PM (#34539458)
AWS has been aggressive in .NET support in the last couple of years: https://aws.amazon.com/developer/language/net/